She leaned against his shoulder.

Literal

She [topic-は] his [genitive-の] shoulder [against-に] leaned.

もたれかかる is a 複合動詞 from もたれる ('lean against') + かかる ('hang on, depend on') — 'lean and hang on' = 'lean heavily against.' The に marks the support — what's being leaned against. Used both physically and metaphorically (もたれかかってばかりいる, 'always relying on (someone)'). The compound is mostly written in kana even though kanji exist (凭れ掛かる).