With Ottawa's Jason Spezza off on a rouging penalty, San Jose's Joe Thornton took the puck behind the Senators' goal, came around the right side and sent a pass to the corner of the net, where Burns one-timed it home to break a 2-2 tie.
Rookie Tomas Hertl scored his seventh goal of the season and Patrick Marleau also tallied for the Sharks, who improved to 5-0-0 starting the season.
Antti Niemi turned aside 21-of-23 shots for San Jose.
Zack Smith and Bobby Ryan each scored for the Senators, who fell to 1-1-2.
Robin Lehner made 47 saves for Ottawa.