Substitute defender Sophie Howard then headed in the winner unmarked for the home side a minute later off a Caroline Weir corner.
Shaw had put the visitors in front with a powerful strike in the 15th minute and equalised in the 49th after a fine shot from 30 yards by Chelsea midfielder Erin Cuthbert and another by Manchester City's Weir had put Scotland ahead.
Jamaica played the last few minutes with 10 women after using up their six replacements.
Scotland are making their World Cup finals debut in France, with Jamaica the lowest-ranked team to qualify, and the turnout shattered the previous record of 4,098 set last year at St Mirren.
"The first 15 minutes, the players found it tough," said Scotland head coach Shelley Kerr. "Maybe a big crowd, a big arena and that was why we did this tonight, to try and get them used to what they are going to have to face in Nice."
Scotland play their opening World Cup Group D game against England, currently ranked third and among the favourites, in the south of France on June 9.
Argentina and Japan are also in the group.
"We did dominate the game but we need to eradicate mistakes from our game. That's going to be important when we play higher-ranked teams in the World Cup," added Kerr.
(Reporting by Alan Baldwin, editing by Toby Davis)