To twist by a trick is a legal offence (7)
I believe the answer is:
contort
'to twist' is the definition.
(contorting is a kind of twisting)
'by a trick is a legal offence' is the wordplay.
'by' is a charade indicator (letters next to each other).
'a trick' becomes 'con' (a con is a fraud or trick).
'is a legal offence' becomes 'tort' (I am not sure about this - if you are sure you should believe this answer much more).
'con'+'tort' is 'CONTORT'.
Can you help me to learn more?
(Another definition for contort that I've seen is " Twist out of shape".)