KANSAS CITY, Mo. -- Yadier Molina looked perfectly comfortable in the No. 2 spot in the lineup.
Molina hit a two-run homer in the first inning and doubled home a run in the third before his sacrifice fly in the fourth scored Pete Kozma.
"Yadier is pretty flexible," Cardinals manager Mike Matheny said. "We like him wherever he hits. Today he did a nice job hitting in the second position."
Molina had batted fifth 40 times and sixth seven times this year.
"It doesn't matter for me," he said. "I've got the same approach: I'm going to be aggressive."
While the Cardinals own the best road record in the majors at 19-9, the Royals dropped their ninth straight home game - one shy of the franchise record set last year.
"We're playing good," Molina said. "We've got some good offense. Right now, we're seeing the ball pretty good. We're finding some holes. We're showing the people we've got a pretty good team. Hopefully we can continue to do that for the rest of the season."
Wainwright (7-3) struck out five and walked none in eight innings for the win. He allowed 12 hits, his most since Sept. 14, 2010, against the Chicago Cubs. The right-hander gave up 12 hits over 22 1-3 innings in his previous three starts.
"Early on, they got some hits off some bad pitches and I felt like as the game went on they put some really good at-bats against me and hit some good pitches as well," Wainwright said. "I broke several of their bats and they found holes. The got some good hits as well on good pitches. I think as a pitcher no matter what happens on the other side you just have to keep battling and keep making pitches and eventually if you keep making pitches things will work out."
Edward Mujica gave up a hit in the ninth but earned his 15th save in as many opportunities.
Shields (2-6) yielded nine hits and season highs of six runs and five walks over six innings while losing his fourth straight start.
"I wasn't commanding my fastball and I was getting behind in the count and then I started walking guys," Shields said. "We've just got to gut it out. We've got great effort in here."
After rain delayed the start for 62 minutes, the Cardinals opened the game with Matt Carpenter's single and Molina's third home run.
It was the first time Molina had faced Shields.
"Shields is a good pitcher," Molina said. "My brother (caught) him in Tampa. I watched him a bunch of times on TV. I've got a pretty good idea what he brings to the table. He made a couple of mistakes in the middle and I took advantage."
Molina's double in the third scored Daniel Descalso. Molina scored on Allen Craig's single.
The Royals answered with two runs in the bottom half. Gordon scored on a wild pitch and Eric Hosmer contributed an RBI single.
The Cardinals expanded their lead in the sixth when Carpenter's double scored Descalso, who had three hits and a walk.
"We showed some life," Royals manager Ned Yost said. "We had Wainwright on the ropes, but we couldn't get the big hit."
- Cardinals RHP Jake Westbrook threw all his pitches in a bullpen session and experienced no pain in the tender elbow that put him on the disabled list May 9. After that, Westbrook canceled an afternoon flight to see Dr. James Andrews for a second opinion on his elbow.
- The Cardinals optioned RHP Carlos Martinez to Triple-A Memphis, where he will start after seven relief appearances in the majors. The 21-year-old Martinez has primarily been a starter in the minors.
- The Cardinals scratched pitching prospect Michael Wacha from a Sunday start with Memphis. He could start Thursday at St. Louis against the Royals. "We're still checking our options," Matheny said.
- 3B Mike Moustakas was held out of the Royals' lineup with a bruised quadriceps, but was available if needed.
- The Cardinals recalled RHP Victor Marte from Memphis, where he had 10 saves.
- LF Matt Holliday, in an 0-for-14 skid, was not in the Cardinals' lineup.