Matt Cain gave up two hits in five shutout innings and Hunter Pence and Andres Torres hit two-run homers in the San Francisco Giants' 5-2 victory over the Texas Rangers on Friday.

Cain, the Giants' opening day starter, got defensive help from his batterymate, Buster Posey, the reigning National League MVP. Posey threw out two runners out at second base on steal attempts.

Right-hander Derek Lowe, signed to a minor-league contract by Texas on March 6, made his first start of the spring and gave up two hits and a walk in two innings.

Pence hit a two-run homer in the fourth inning to break a scoreless tie and added a run-scoring double in the sixth for a 3-0 lead.