The game burst into life with four goals in seven minutes midway through the second period before Hughes came off the bench to hit an 87th-minute clincher.
The goal rush began after 57 minutes when Jeff Hughes centred for Francois Zoko to tap home and put County ahead.
Matt Richards levelled for Shrewsbury after 61 minutes, sending Bartosz Bialkowski the wrong way from the penalty spot after Dean Leacock was adjudged to have pulled back Marvin Morgan.
Shrewsbury then took the lead a minute later with a wonder-goal from full-back Jermaine Grandison, who went on a stunning individual run before slotting calmly past Bialkowski.
However, the lead lasted barely two minutes as Jeff Hughes looped a header over Chris Weale and substitute Lee Hughes slotted home the winner.