Momentarily properly means "for a brief moment" — as in the screen flickered momentarily — though it's also used informally, especially in American English, to mean "very soon." Shortly always means "soon." If you want to avoid ambiguity about whether something is happening briefly or happening soon, shortly is the safer choice.
The core difference
Momentarily describes a short duration (or, informally, imminent timing); shortly describes imminent timing only.
- momentarily — for a very short period of time, or (chiefly American) very soon: She paused momentarily before answering.
- shortly — soon, or after a brief time: The doctor will see you shortly.
How to tell them apart
The mix-up happens because momentarily has picked up a second meaning in American usage — "in a moment" — that overlaps with shortly. A useful memory hook: momentarily shares its root with moment, so its core sense is about a short span of time, not necessarily how soon that span begins. Shortly is only ever about timing.
This is why airline announcements that say the plane will be moving momentarily can sound odd to some listeners expecting "for a moment" rather than "very soon." If precision matters, or your reader might expect the British sense, use shortly for "soon" and reserve momentarily for describing something brief.