She asked me for help when she was in trouble.

Literal

She [topic-は] is-troubled time [at-に] me [from-に] help [object-を] sought.

助けを求める ('ask for help, seek aid') is the standard collocation for requesting rescue or assistance; 求める is the polite 'seek, request' verb often paired with abstract or weighty objects (許可を求める 'seek permission,' 答えを求める 'seek an answer'). 困っているときに ('when she was in trouble') uses ~ている (state-of-being) + とき ('time') + に (point in time) to set the temporal frame — a productive way to express 'when X is happening.' The に on 私 marks me as the addressee of her plea — the source of the help she sought.