Shaw had a two-run homer and an RBI single, giving him eight hits and two walks in 16 plate appearances. He is pushing converted outfielder Hanley Ramirez for playing time at first base.
Pirates outfielder Starling Marte singled and scored on a wild pitch.
Yoan Moncada, Boston's top prospect, was called up from minor league camp and started at second base. He went 0 for 2 with a walk.
"This is an opportunity for some young players to get some exposure to this environment, to the game at this speed and strength," manager John Farrell said.
The Cuban free agent signed for a $31.5 million bonus in March 2015, then hit .278 in 81 games with Low-A Greenville.
The 20-year-old Moncada played last week in Boston's doubleheader against Boston College and Northeastern. The Pirates were the first major league team he faced.
"He was down in Fort Myers a good week or 10 days before our big league camp opened, so he's game ready," Farrell said.
In the minors, Moncada produced four homers and 38 RBI. He also made 23 errors at second base.
"We're still taking a look at him at that position," Farrell said. "Who knows how fast the advance is? That's all yet to be determined. But he's a young, athletic guy who seemingly has a really bright future ahead of him."
Moncada made a great play on Alen Hanson's slow roller in the first inning, charging in to scoop the ball and making a strong throw.
Farrell chuckled when asked how Moncada has looked during workouts this spring.
"I guess he's looked great, because they sent him over here today," Farrell said.
Red Sox: RHP Joe Kelly worked 2 1/3 innings and gave up one run on three hits. He walked two and struck out three.
Pirates: RHP Ryan Vogelsong went three innings and allowed three runs on four hits and two walks.
"You don't want to not pitch well, but you need to battle every once in a while," Vogelsong said. "I'd rather have it now and get it out of the way than have it happen right before the season starts."
Vogelsong, 38, has lost much of the zip on his fastball, so he's evolving into a groundball pitcher. On a windy afternoon at McKechnie Field, six of his nine outs against the Red Sox came on balls in the air.
"Elevated a couple pitches and got a fly ball blown out of the ballpark," manager Clint Hurdle said, referring to Shaw's first-inning homer. "A bad day to give up a fly ball to left field."
Red Sox: RHP prospect Michael Kopech will get a second opinion on his fractured right hand. Kopech was injued during an altercation with a teammate. . C Christian Vazquez (elbow surgery) reported no problems after catching two innings in a game on Tuesday. He'll work three or four innings Friday against the Toronto Blue Jays, according to Farrell. . LHP Eduardo Rodriguez (knee) is throwing a normal flat-round routine from 60-90 feet. . Koji Uehara threw a 30-pitch simulated game and could be ready to pitch in a game by this weekend.
Pirates: RHP Gerrit Cole (rib) will make his first outing Sunday against the Detroit Tigers. . OF Austin Meadows sustained a fractured right orbital bone during a workout on Tuesday in minor league camp. Meadows will be examined by team doctors in Pittsburgh to determine the extent of the damage. The ninth overall pick in 2013, Meadows last season batted .307 at High-A Bradenton and .360 at Double-A Altoona. . 3B Jung Ho Kang (broken leg) still has not been cleared for baserunning, but is doing linear movement on the infield. . LHP Cory Luebke (hamstring) threw live batting practice.