She only talks to him when she's in trouble or needs something.
「彼女は自分が困った時や何かを頼む時だけ、彼に連絡をとる。」= "She only talks to him when she's in trouble or needs something."
「困るとき」= "when you're in trouble"
「何かを頼むとき」= "when you need something"
「友達のふりをする。」= "She pretends to be his friend"
ご参考になれば幸いです。
She only contacts him when she's having a hard time or needs his help for something.
この場合、次のような言い方ができますよ。
ーShe only contacts him when she's having a hard time or needs his help for something.
「彼女は困った時か何か彼の助けが必要な時だけ、彼に連絡を取る」
to contact で「連絡を取る」
to have a hard time「困難な状況である」
ご参考まで!