Hamlet has to be rewritten for her (6)
I believe the answer is:
thelma
'her' is the definition.
'hamlet has to be rewritten' is the wordplay.
'hamlet' can be anagrammed to 'THELMA'.
However, I'm not sure how the anagram is indicated.
'for' is the link.
Can you help me to learn more?
(Other definitions for thelma that I've seen before include "Louise's friend" , "Charge with gas" , "-- and Louise, 1991 film" , "Louise's partner" , "Foreign policy of force" .)