The Shrews were under pressure for long spells, but snatched a rare away success thanks to Aaron Wildig's second-half goal.
Shrewsbury went in front in the 23rd minute when Oldham full-back Connor Brown was caught in possession by Tom Eaves, whose header set up Jon Taylor to volley home from 12 yards.
Oldham levelled after 35 minutes as Shrewsbury failed to clear Korey Smith's corner and Jonathan Grounds fired low into the net from eight yards.
The home side had a spell of dominance which saw visiting goalkeeper Chris Weale pull off fine saves to deny Mike Petrasso and David Mellor.
Oldham also hit the woodwork either side of half-time, Smith's 30-yard free-kick smashing against the crossbar before Adam Rooney headed against a post.
Shrewsbury hit their winner against the run of play, in the 62nd minute when Wildig's first effort came back off the post and he tucked away the rebound from 10 yards.
Weale denied Jonson Clarke-Harris, but Oldham faded in their search for an equaliser.