The Scotland midfielder beat Steve Mildenhall from 25 yards with a low shot to give the Championship club a narrow victory over their spirited League Two opponents.
Jacques Maghoma’s opener had earlier been cancelled out by Rovers’ Ellis Harrison.
Gary Rowett made eight changes to his Blues line-up while Rovers boss Darrell Clarke made three alterations from his opening-day starting XI and changed to a 3-5-2 formation.
It showed as both teams took time to settle and a low-key first half saw Rovers’ Jake Gosling go close with a 41st-minute free-kick that flashed past a post.
Birmingham’s best chance in the opening 45 minutes fell to Thomas shortly before the break. He latched onto a poor header from Tom Parkes but elected to lob tall goalkeeper Mildenhall and cleared the crossbar.
The second half, though, was an excellent advert for the competition, starting when Maghoma fired Blues into a 57th-minute lead after Mildenhall had saved at the feet of Wes Thomas.
Rovers bounced back eight minutes later, Harrison volleying in from 12 yards after a Lee Brown cross had been blocked into his path, but Shinnie had the final say.