CHICAGO — Boston’s rotation woes continued Sunday, and the rebuilding Chicago White Sox took full advantage.

James Shields threw six scoreless innings, Tim Anderson and Daniel Palka homered, and the White Sox beat the major league-leading Red Sox 8-0 to split their four-game series.

Anderson had three hits, including two doubles, for the White Sox, who have won seven of their last 10 games.

Xander Bogaerts and J.D. Martinez had two hits apiece for Boston, which had won four of its last five.

The Red Sox have the majors’ best record at 94-44 and maintained a 7 1/2-game lead in the AL East over the New York Yankees, who lost to Detroit.

With Chris Sale and David Price out with injuries, the Red Sox have had just two quality starts in their last 17 games. Their starting pitchers combined to allow 12 earned runs in 14 innings in the series.

“We’re going to be fine,” Manager Alex Cora said. “When you start getting hurt, especially your main guys, it’s not easy to go out there with the guys that we’re throwing and keep throwing the ball well.

“They did it for a month and a half right after the All-Star break. Now it’s not that way. I feel the healthier we get, the better it’s going to be.”

Shields (6-15) struck out six, and allowed four hits and two walks. He has thrown at least six innings in 21 of his last 25 starts. Three relievers completed the five-hitter.

Five Red Sox pitchers combined to strike out 12 but gave up 15 hits.

“We have the right guys in the bullpen to help us out as far as innings and all that, and I think it’s going to turn around because of that,” Cora said.

Brian Johnson (4-4) allowed four runs and seven hits while recording four outs in his shortest start of the season.

“I threw a lot of strikes but they weren’t where I wanted them,” Johnson said. “Fastball wasn’t cutting and my curveball had nothing on it.”

Anderson hit his 18th homer this season on the first pitch with one out in the first. Kevan Smith’s single added a run.

Matt Davidson’s two-run double chased Johnson in the second. The White Sox extended their lead to 5-0 on Adam Engel’s single off Bobby Poyner in the third inning.

Palka smacked his 20th home run in the fourth off William Cuevas – four pitches after hitting a long drive just foul and completing a jog around the bases before heading back to the plate.

“It was funny because the bat boy went to give me a high-five and I was like, ‘Just give me the bat,’ ” Palka said.

HE GONE

In a pregame ceremony, the White Sox honored TV play-by-play announcer Ken “Hawk” Harrelson, who is concluding his 34th and final year in the booth.

Harrelson played nine seasons in the majors with four teams and rose to stardom in 1967, when he helped the Red Sox win the AL pennant. The following season, he led the majors with 109 RBI and finished third in AL MVP voting.

He became a broadcaster in 1975 with the Red Sox and served a season as the White Sox general manager.

Harrelson made no apologies for his ardent support for his team.

“The biggest compliment you can pay me is calling me a homer because I want these guys to win every game,” he said.

NOTABLE NUMBER

The White Sox won 4 of 7 games against Boston this season.

“The second half has just been a whole different team – same guys, things are just clicking more consistently,” Palka said.

TRAINER’S ROOM

White Sox catcher Welington Castillo (right shoulder) was activated from the 10-day disabled list and is expected to start Monday against Detroit. Castillo was suspended for 80 games on May 24 after testing positive for a performance-enhancing substance. He hasn’t played since May 23.