Brett Jackson hit a three-run homer off Kansas City’s Jon Rauch in the eighth, and then had a go-ahead, two-run single against Tim Collins in the ninth.
Shields, who is slated to start on opening day, allowed an infield single and threw 49 strikes in 75 pitches.
Jeff Samardzija, who will start the Cubs’ opener, gave up a home run to Jarrod Dyson on his third pitch. He was charged with four runs and seven hits in 3 2/3 innings.
Johnny Giavotella homered with Dyson aboard in the third. Giavotella drove in another run in the fourth with a sacrifice fly.