Striker Fola Onibuje gave the visitors an early lead, but during a second half played out through driving rain, Ben Davies levelled with a spectacular free-kick for the Shrews - only for substitute Aaron Brown to win it for Swindon with a deflected shot nine minutes from time.
It was tough luck on Shrewsbury who had the better of an untidy second half, but whose recent form has seen them slip down the table, while Swindon, under the guidance of Dennis Wise remain among the front runners.
The match kicked off in bright sunshine, with no hint of the wretched weather to follow and Swindon made the most of their bright start, taking the lead after just 12 minutes. Although Shrews' keeper Chris MacKenzie did well to keep out a Lee Peacock effort at full-stretch, Onibuje was on hand to ram the ball from close range.
Shrewsbury responded with efforts from Dave Edwards and Davies, both of which required safe hands from Phil Smith in the Swindon goal.
However the next goal should have also gone to the Robins when Ricky Shakes broke clear of a hesitant Shrewsbury defence - but his shot struck the outside of a post after he had slipped the ball past the advancing MacKenzie.
As the weather deteriorated so did the match itself, but the afternoon was then illuminated by Shrewsbury's superb equaliser. From 20 yards Davies curled a brilliant right-footed free-kick round the Swindon wall and past the despairing Smith to claim his sixth goal of the season.
It was not enough to earn Gary Peters' men a draw. When they failed to completely clear a corner, Brown tried his luck with a shot from the edge of the box - with fortune favouring the brave as a deflection left MacKenzie wrong-footed and Swindon to celebrate their fourth away win of the campaign.