Fergus is likely to be out of action for up to six months.
Scotland team doctor James Robson said: “As we are at the end of the season Fergus has been seen by specialist surgeon Julie McBirnie at Spire Shawfair Park Hospital in Edinburgh.
“He required three separate components in his shoulder to be repaired and, as a result, will not be able to participate in our Rugby World Cup training squad and has been ruled out of consideration for the tournament itself.”
Scotland head coach Andy Robinson said: “It’s obviously disappointing news for Fergus but we wish him a speedy recovery.”
No player is being added to Scotland’s RWC training squad at this stage.
Fergus said: “I’m gutted at missing out on the chance to compete at the World Cup. My focus will be on working hard with the Glasgow physios on my rehab so that I can be back challenging for a place with the Warriors as soon as possible.”