"It wasn't an easy night, but we did well," Tampa Bay manager Joe Maddon said.
Rodriguez finished with four RBIs. He put the Rays ahead with a two-run homer during the second off Brad Hand (0-3), and added a two-run double in the eighth.
"You want to find a way to produce so you can help the team win," Rodriguez said.
Shoppach made it 3-0 on a third-inning solo shot.
Davis (6-5) allowed one run, six hits, two walks and had two strikeouts.
Tampa Bay scored six runs combined in losing two of three to the AL East-leading Boston Red Sox in a series that ended Thursday night. Rodriguez struck out with two on and two outs in the ninth of Thursday's 4-2 loss to Boston.
"Definitely, it would have been nice against Boston, but a win is a win," Rodriguez said.
The Marlins, who have lost eight in a row and are 1-16 in June, got a homer from John Buck.
"I might come in early (Saturday) and turn the calendar one month ... make them think it's July," Marlins manager Edwin Rodriguez said with a smile. "I think they're pressing too much. They know we've been struggling."
Before the game, Florida optioned outfielder Chris Coghlan to Triple-A New Orleans. The 2009 NL Rookie of the Year hit .230 with five homers and 22 RBIs in 65 games this season.
Florida also purchased the contract of outfielder Dewayne Wise from New Orleans. He started in center and went 2 for 4.
Edwin Rodriguez was ejected by plate umpire Ted Barrett for arguing after Sean Rodriguez's fan-interference eighth-inning double scored a pair and extended the Tampa Bay advantage to 5-1. The umpires sent Evan Longoria, who was on first, home on the play where a fan down the right-field line reached over the wall to grab the baseball.
The Florida manager felt the play should have been called a ground-rule double that would have kept Longoria at third.
"That wasn't the game," Edwin Rodriguez said. "We have to hit. We're not hitting, period."
Longoria had briefly grabbed his leg earlier in the ninth after returning to first on B.J. Upton's liner. Maddon said Longoria has a sore spot on his foot, but it's not an issue.
Rodriguez had just three hits in his previous 28 at-bats before hitting his third homer of the season. Shoppach, who entered hitting .181, also has gone deep three times this year.
Buck cut the deficit to 3-1 with a solo shot in the fifth.
Hand allowed three runs and three hits over 4 2/3 innings in his third major league start. The left-hander struck out two and walked three during a 98-pitch outing.
Davis has won consecutive starts after a stretch of five winless outings -- including three losses. It was Davis' first interleague win after losing all three of his previous starts against NL teams.
The announced crowd for the matchup between the two Florida teams was just 15,708. The Rays entered Friday averaging an AL-low home attendance of 18,257.
Marlins ace Josh Johnson (right shoulder inflammation) resumed throwing off a bullpen mound. He hopes to rejoin the rotation in mid-July. ... Wise and Emilio Bonifacio will both get playing time in center. ... The Rays plan to reinstated RHP Jeff Niemann (strained lower back) from the 15-day disabled list to start Monday night's game at Milwaukee. ... Florida RHP Edward Mujica was unavailable due to a wrist injury.