It marks Ramirez's second stint with the Red Sox this season. The right-hander struggled in his Major League debut on July 3 against the Astros. He allowed four runs (two earned) on three hits in one inning and took the loss. It remains his only big league appearance.
The addition of Ramirez will spread out the workload among the other right-handed relievers.
"The arm slot is unique to the other guys in the bullpen, and we have a fit for him," said Farrell, "particularly when you get into the heavily right-handed lineups that we have in this series and then with Houston and Detroit."
Shaw appeared in three games during his stint with the club, starting at first base in every contest. He collected his first Major League hit on July 7 against the Marlins, going 3-for-4 with a run scored.
Quinn Roberts is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.