Shaw and Santana hit back-to-back homers in a three-run first inning and Yelich hit a two-run homer in the second as the Brewers won for the fifth time in seven games.
Daniel Descalso's two-run homer in the first inning was one of four hits for the Diamondbacks, who have lost seven of eight and 10 of 14. The Brewers took two of three in the series after Washington swept a four-game series in Arizona last weekend.
Shaw and Jonathan Villar had two hits and Shaw and Lorenzo Cain scored twice.
Brandon Woodruff (2-0) gave up one hit and two runs in five innings before the Brewers' bullpen pitched four innings of scoreless relief. Woodruff had six strikeouts and four walks.
Arizona starter Matt Koch gave up nine hits, including all four homers, and eight runs in 4 1/3 innings, his shortest start of the season. He walked one without a strikeout.
Cain walked and stole second base in the first inning before Shaw and Santana hit back-to-back homers for a 3-0 lead. Santana hit the first pitch he saw for his second homer after Shaw hit his 10th.
Descalso hit his fifth homer to make it 3-2 after Jarrod Dyson walked. Descalso made his second career start hitting third in the lineup. The first came Tuesday, when he drove in the game-winning run with a two-out single in the eighth. He is 21-for-63 with eight doubles, three homers and 16 RBIs in his last 23 games.
Yelich homered after Cain singled with two outs in the second inning for a 5-2 lead.
Saladino, who had an inside-the-park homer Friday, hit one over the center field fence to make it 6-2 in the fourth inning.
Shaw doubled to knock out Koch after Jesus Aguilar singled with one out in the fifth inning. Aguilar scored on Santana's groundout and Villar doubled in Shaw for an 8-2 lead.
--Field Level Media