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)
'a trick is a legal offence' is the wordplay.
I cannot really understand how this works, but
'trick' could be 'con' (a con is a fraud or trick) and 'con' is found within the answer.
'offence' could be 'tort' (legal term for a type of offence) and 'tort' is found within the answer.
This accounts for all the letters.
This explanation may well be incorrect...
'by' is the link.
Can you help me to learn more?
(Another definition for contort that I've seen is " Twist out of shape".)