Three goals in the closing 12 minutes handed Shelbourne three crucial points over second-from-bottom Wexford Youths at Ferrycarrig Park.
The early surge came from Shelbourne with Mark O'Brien firing a great twenty-metre effort over the top after just four minutes.
It was a bright opening to the game and three minutes later Wexford Youths raided down the left with Johnny Flynn-O'Connor having a cross-cum-shot tipped away by keeper Dean Delaney.
Shelbourne bossed the opening 15 minutes but were unable to break down the home side’s back four, where Anthony Russell was outstanding.
Wexford gradually came more into the game, with keeper Delaney tipping a Keith Kearney shot over for the a corner.
Both sides were playing the game at pace. While Shelbourne must have been concerned at allowing the early initiative slip, they responded on 23 minutes when Philly Gorman had what appeared a goal-bound shot headed clear by Paul Rossiter.
The closing 20 minutes of the half were dominated by the home side with Gavin Doyle and Conor Sinnott controlling midfield. After 27 minutes, Sinnott forced an excellent save out of keeper Delaney from a 25 metre free-kick.
Centre-forward Paul Murphy then forced Delaney to tip away a shot, leaving Richie Fitzgerald to return the ball across the face of the goalmouth, with Murphy seeing his effort rebound off the post and going across the goal to safety.
Shelbourne turned up the tempo after the restart, almost claiming the opening goal after 50 minutes, but Philly Gorman's header from a Mark Rutherford cross crashed back off the post with the keeper beaten.
The visitors speed and touch saw them control the second half but Wexford Youths, who had Anthony Russell red carded on 65 minutes, finally succumbed to the intense pressure when, Gorman powered high into the net after 78 minutes.
It all went horribly wrong for the home side in the closing minutes, with David McAllister scoring twice on 88 minutes and from the penalty spot one minute later when Wexford were reduced to nine players as Joey Wadding was dismissed.
Wexford Youths: P Doyle, C Wallace, A Russell, P Rossiter, J Flynn-O'Connor, G Doyle, K Kearney, C Sinnott, P Malone, R Fitzgerald (J Wadding 65)), P Murphy (L Aust 83).
Shelbourne: D Delaney, A Murphy, D Lawrence, D Brennan, R Hedderman, D McAllister, D McGill, M O'Brien J Chambers 50), P Gorman, D Forsythe, M Rutherford.
Referee: D Coombes (Dublin).