The home side, who needed to win to have any chance of avoiding relegation from League one, made a flying start with top scorer Jon Taylor heading home Joe Jacobson's sixth minute cross.
But Peterborough responded strongly to open up a 3-1 lead. Conor Washington's shot was too powerful for Chris Weale to keep out for an equaliser and then Washington raced on to a fine pass from Tommy Rowe to fire past the advancing Weale.
Washington nearly completed his hat-trick when he hit the bar but Lloyd Isgrove was on hand to slam in the rebound for Posh's third in the 27th minute.
Shrewsbury were offered a glimmer of hope on the stroke of half time when Tom Bradshaw volleyed a Ryan Woods cross from 12 yards to the bottom corner of the net.
The second half continued to be an open affair with Tom Eaves close to a leveller when his effort was well kept out by Bobby Olejnik.
Peterborough had the chance to move further clear when Washington was pulled down by Dave Winfield, but Weale pulled off an excellent save from Britt Assombolanga's spot kick.
Posh added a late fourth when substitute Josh McQuoid, set up by Nathaniel Mendez-Laing, fired past Weale.