Colby Rasmus homered and drove in three runs as the Astros beat San Diego 9-4 Monday night for their fourth straight victory and ninth in 10 games.
Shields matched his season high for strikeouts and allowed three runs — one earned — over six innings. The Padres have dropped five of six.
"I felt I was locating well in certain situations," Shields said. "Unfortunately we lost tonight."
Shields signed a $75 million, four-year contract with San Diego in the offseason, the richest free-agent deal in club history.
The right-hander fell behind 3-0 in the fifth before the Padres scored three to tie it. Shields helped his own cause with an infield single.
"He battled all night," San Diego manager Bud Black said. "His stuff was good and he pitched well. But I like the way we came back. We were down 3-0 and tied it and they went ahead 4-3 and we came back."
Pat Neshek (1-0) retired the only two hitters he faced to earn the win.
Cory Mazzoni made his major league debut in the ninth for the Padres and gave up a two-run homer to Rasmus.
Houston starter Collin McHugh yielded three runs and seven hits in six innings.
"I wouldn't have guessed it would be a 9-4 game the way the starting pitchers were going," Astros manager A.J. Hinch said. "What started out as a pitchers' duel ended up with a lot of offense."
Castro hit his second homer of the season leading off the seventh against Brandon Maurer to break a 3-all tie.
Lowrie homered into the porch in right field against Shields in the fourth for a 1-0 Houston lead.
"You can't let off the gas pedal in games like this," Hinch said.
Astros: Lowrie left in the eighth inning with a right thumb injury. He will return to Houston on Tuesday and have an MRI. "It's swollen. It doesn't feel good," he said.
Padres: RHP Shawn Kelley (strained left calf) threw a 30-pitch batting practice session. Kelley was placed on the 15-day disabled list last week.
Astros: Roberto Hernandez (0-2, 3.57 ERA) looks for his first win with Houston after signing a minor league contract and winning a spot in the rotation during spring training.
Padres: Tyson Ross (1-1, 3.97) will try to rebound from a loss at Colorado, where he gave up two runs in five innings.