The Terps dropped an unexpected game to Delaware but will have a chance to build some momentum off the Saints.
The Terps had their four-game winning streak cut off by the Blue Hens in their fifth game in seven days.
Costes launched his seventh homer of the season to boost the Terps toward a second victory over the Hoyas.
After trailing for the majority of the game, Shaw came up with a big swing in the bottom of the ninth to secure the victory.
The Terps' loss to the Pirates was plagued with small mistakes and missed opportunities.
The Terps overcame a strong offensive day from the Rams to move to move to 10-2 on the season.
The Terps were unable to quell the Pirates after stranding multiple runners in pivotal moments in the game.
The Terps scored three runs in the fourth inning to reinsert themselves into the game, and quickly pulled away soon after.
The Wolverines cracked a three-run homer to take the lead from the Terps and never looked back.