It was only Trinity’s third away win of the season and ensured a 17th place finish for Shaw’s side, seven points clear of the relegation zone.
And Shaw was happy with how the campaign ended.
He said: "I thought it was a brilliant performance. It's a really bumpy and sticky pitch so we had to play to the conditions and I thought we did that really well.
“When we've had our positive results along the way it's always felt a similar theme, the players being really unselfish and putting the team first.
“We're battered and bruised and we had to roll some bodies out on the pitch and you could see at the end we were very tired, but there was some grit and determination and resilience on the pitch and that got us a result.
"You can see why Whitby are at the top end of the league and nearly got in the play-offs as they’ve got some excellent footballers so I’m delighted with the performance. ”
After Javon Makama put Gainsborough into a half time lead, Whitby’s Jacob Hazel levelled on 73 minutes only for Alex Wollerton to net the winning goal just three minutes later.
Shaw added: “It shows a lot about the team’s character and ability [to respond so quickly] but in the last 14 or 15 games that’s the team and I think if we had that team from July 1 we’d be in the top half.”
Shaw can now look ahead to next season knowing his team will be in the same division and hoping to improve on this campaign’s overall showing.
He said: “We’ve got loads to sort out and I’ll speak to the chairman and the board this week and get to the important stuff about what it will look like and who will be on the journey with us, but some brilliant foundations have definitely been laid and nobody can question the attitude and application shown.
"The lads have given everything every week and been well received by a brilliant group of supporters home and away.
"I think the fans have been fantastic because there were games where they could have turned but if you put a team out there that works really hard the result is secondary because the fans will love the effort.”