She has to go shopping in the afternoon.

Literal

She [topic-は] PM [at-に] shopping [for-purpose-に] go [must-なければならない].

Two に particles do separate work here: 午後に marks the time, 買い物に marks the purpose of motion. The double-に doesn't conflict because each に attaches to a different role. ~に行く ('go for the purpose of') uses the masu-stem of a verbal noun (買い物 itself is a verbal noun) plus に — same pattern as 散歩に行く ('go for a walk') or 食事に行く ('go to eat'). ~なければならない layers obligation on top.