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"
ご参考になれば幸いです。