Vincent Trocheck scored in the first round of the shootout. Shesterkin made saves on Anthony Mantha and Egor Chinakhov in the first two rounds before Tommy Novak missed the net in the third round.
Mika Zibanejad and Taylor Raddysh scored for the Rangers (23-29-7), who had lost five straight (0-4-1).
Mantha and Ryan Shea scored, and Stuart Skinner made 23 saves for the Penguins (30-15-13), who are 9-1-4 since Jan. 13.
Mantha put Pittsburgh ahead 1-0 on a power play at 2:08 of the first period, deflecting a point shot from Erik Karlsson for his 21st goal of the season.
Bryan Rust appeared to extend the lead on a second power play at 3:00, taking a cross-ice pass from Evgeni Malkin for a snap shot in the left face-off circle, but it was disallowed after Mantha was ruled to have interfered with Shesterkin following a coach's challenge by the Rangers.
Rust later hit the right post with another snap shot on a rush at 13:23.
The Penguins outshot the Rangers 10-2 in the first.
Shea made it 2-0 at 1:59 of the second period. He spun off Noah Laba at the point for a wrist shot that went in off New York defenseman Scott Morrow.
Zibanejad cut it to 2-1 at 10:00 with a power-play goal, a one-timer from the slot set up by Trocheck. It was Zibanejad's team-leading 24th goal and 12th on the power play.
Novak could have put Pittsburgh back up by two on a breakaway at 15:02, but had a backhand denied by a pad save from Shesterkin.
Raddysh tied it 2-2 at 2:57 of the third period by redirecting a shot from Vladislav Gavrikov while drifting above the crease.