SAN JOSE, Calif. — Joe Thornton scored the lone shootout goal in the fifth round, and Alex Stalock stopped all five tries as the San Jose Sharks overcame a two-goal deficit to beat the Dallas Stars 3-2 on Saturday night.Joe Pavelski and Jason Demers scored in regulation for the Sharks, who had lost six of eight before rallying for this win. Stalock made 44 saves and got the win in his first career shootout. Dallas defenseman Sergei Gonchar left the game in the second period with an upper-body injury.Ray Whitney and Antoine Roussel scored for the Stars, who were in position to win their third straight game but couldn’t hold a third-period lead. Kari Lehtonen made 37 saves. After neither team scored in the first four rounds, Thornton beat Lehtonen for his second shootout goal in as many tries this season. Stalock sealed the win when he stopped Whitney. After a lackluster start that led to a 2-0 deficit, the Sharks fought back and tied the game early in the third period shortly after failing to convert on the power play. Thornton did a good job keeping the puck in the zone at the blue line and fed Pavelski, who skated from the boards to the middle and beat Lehtonen with a backhand for his 14th goal. That is where the game stood until the shootout. Stalock got his first career start at home in place of Antti Niemi, who got a night off after allowing four goals in a loss at Los Angeles on Thursday night. Stalock had four road starts this season, mostly playing on the back end of back-to-backs. He was shaky at times as the Sharks fell behind 2-0 early in the second period. It is the second straight game and fifth this month that San Jose has allowed the first two goals after not doing it in the first two months. Whitney, who played on the original Sharks team in 1991-92, capitalized on a bad clearing attempt by San Jose when he sent a backhand from the circle through Brad Stuart’s legs and over Stalock’s shoulder to give him points in 10 straight games against his former team. Each team failed on a pair of power-play chances, and that is where the game stood after the first period. But Dallas struck again early in the second on a delayed penalty when Alex Goligoski’s centering pass from a bad angle deflected off Roussel and into the net. The Stars nearly added another but referee Mike Leggo blew his whistle even though the puck was loose in the crease, negating a potential goal by Colton Sceviour. The Sharks picked up their play after that and got on the board midway through the second when Tyler Kennedy fed a trailing Demers, who beat Lehtonen with a one-timer to end a 44-game goalless streak. NOTES: The Sharks will be without rookie F Tomas Hertl for at least a month after he was hurt in a knee-on-knee collision with Los Angeles’ Dustin Brown on Thursday. … F Vern Fiddler (upper body) was activated from IR to take the place of injured D Aaron Rome (lower body). … San Jose had its 150th consecutive regular-season sellout.