"We didn't lose composure, we knew what we needed to do," said Shaw, who tied it for the second time with his second goal of the game to make it 4-4 at 9:20.
Max Domi assisted on each of Shaw's goals to extend his point streak to six games. He has 10 points (four goals, six assists) during the streak, and five assists in his past two games.
Alex Tuch tied it 3-3 for Vegas on his own rebound at 14:34 of the second after Montreal scored three goals in 3:53 earlier in the period to take the lead.
Charles Hudon made it 2-1 on a backhand at 6:04; Shaw scored 65 seconds later after gathering a loose puck in front to tie it 2-2 at 7:09; and Kotkaniemi, who set up Hudon's goal, scored at 9:57 to put Montreal ahead 3-2.
"The guys fought hard," Shaw said of the Canadiens, who trailed 2-0 after the first period. "We didn't have the start we wanted, we put ourselves behind the eight ball, but we got motivated in the intermission, came out flying and we found a way to win. It builds character in the room."
Brad Hunt gave Vegas a 1-0 lead on with power-play goal from the right face-off circle at 17:40 of the first. Jonathan Marchessault made it 2-0 at 18:37 when Reilly Smith's pass deflected in off his skate.