SAN FRANCISCO -- Ian Snell is a big reason the Pittsburgh Pirates are playing much better.
After walking three of his first six batters Saturday, Snell settled down and pitched three-hit ball for seven innings to win his fifth straight start and lead Pittsburgh past the San Francisco Giants 2-0.
"It's a team thing. We've shown signs of turning the corner, but it's just a matter of believing in ourselves," Snell said after combining with three relievers to blank the Giants. "Everybody in here is doing their part to turn it around. We just have to trust one another and believe in each other."
Jose Castillo and Jose Bautista homered for the Pirates, who are 10-6 since May 24 after starting the season 14-33.
The Giants played without Barry Bonds for the fourth straight game. Bonds is nursing a sore left side and isn't expected to play again until next week when San Francisco travels to Arizona.
The Giants are 1-3 since Bonds left the lineup, though his presence might not have mattered the way Snell (7-3) was pitching. The right-hander overcame a shaky start in the first inning when he threw 29 pitches, finishing with five strikeouts while retiring 16 of his final 17 batters.
"He was struggling a little bit mechanically and his command was (off)," Pirates manager Jim Tracy said. "To rectify himself in the manner he did is just terrific. It's a sign of his growth."
Pittsburgh, which beat San Francisco 3-2 on Friday, won consecutive road games for the first time this season. The Pirates are just 7-25 away from home but 3-3 on their current trip.
Snell's last loss came May 14. Coming off a 10-strikeout performance against Colorado in his previous start, he didn't allow a runner past first base after the second inning.
He struggled with his control early and received a brief visit on the mound in the first from pitching coach Jim Colborn. Snell shrugged off any concerns Colborn had, then slammed the door on San Francisco's offense.
"That mound there is pretty high and it was kind of tough to adjust to at first," Snell said. "(Colborn) told me my mechanics were off, that I was rushing. He told me to just forget about that (inning) and go after guys."
San Francisco put two runners on in each of the first two innings, but Snell escaped by striking out Mark Sweeney to end the first and getting Randy Winn to fly out to end the second.
Snell helped himself after giving up a leadoff single to Giants pitcher Noah Lowry in the fifth, snaring Winn's line drive and throwing to first baseman Sean Casey to double off Lowry.
Roberto Hernandez relieved Snell to start the eighth and gave up a one-out double to Winn and a single to Omar Vizquel before being removed for left-hander Damaso Marte, who got Steve Finley to ground into a 6-4-3 double play.
Mike Gonzalez pitched the ninth for his 10th save in 10 opportunities to complete the six-hitter, Pittsburgh's third shutout this season. The Giants were blanked for the third time.
"I don't want to give anybody too much credit," San Francisco outfielder Moises Alou said. "We just (stunk) today."
The Giants wasted a solid pitching performance from Lowry (2-4), who scattered three hits over eight innings while striking out a season-high five. The lefty made only two mistakes - a solo home run to Castillo in the second and another to Bautista in the sixth.
"He threw a great game, just like Matt Morris did (Friday)," San Francisco manager Felipe Alou said. "Same thing, same kind of performance. No runs to defend."
Castillo's homer came moments after Pirates third baseman Freddy Sanchez was ejected by plate umpire Rick Reed. Sanchez, who went into the game with an NL-leading .342 batting average, was upset after being called out on strikes and argued with Reed while walking toward Pittsburgh's dugout. Reed followed Sanchez briefly before tossing the infielder from the game.
Lowry settled down after that and retired nine of his next 11 before Bautista led off the sixth with his fifth home run.
Bonds, a late scratch Friday, had hoped to play Saturday but was held out after consulting with team trainers.
"He wanted to play today but the trainers don't feel he should play," Felipe Alou said. "They don't believe he should take a chance, not today, not tomorrow."
Bonds did not take batting practice and brushed aside questions about his health before the game.
"I feel good," he said while making his way through the clubhouse. "I'm breathing. Don't you feel good?"
San Francisco 2B Ray Durham returned to the lineup after missing Friday's game with a stiff neck. Durham went 1-for-3 with a walk. ... Castillo is batting .370 over his last 29 games. ... The Pirates are on pace to hit 185 home runs this season, which would break the franchise record of 171 set in 1999. ... Bautista's home run was just his second this season off a left-handed pitcher.