Chesterfield moved up to second spot in League Two as Shrewsbury suffered their fourth defeat in a row.
The Shrews led when David Hibbert rifled the ball in from 10 yards but the Spireites equalised through Adam Rooney's fine low shot from 20 yards.
Jamie Lowry struck to put Chesterfield ahead and Jack Lester made it 3-1 from the spot after being hauled down in the box by Kelvin Langmead.
Colin Murdock closed the gap when he headed home Marc Tierney's free-kick.