Eight-times capped Thomson, 27, who was in Scotland's squad at the last World Cup four years ago and played against New Zealand in that competition, 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."
Thomson 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."
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 World Cup training squad at this stage.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The Barbarians are one of the top invitational rugby sides with a long history and classic rugby jersey.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Lions get ready for their matches with this green training jersey. It's what the players wear. Get in the Gear!
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
$29.99
The Lions are ready to get their Australia tour underway. They arrive in Perth on Monday.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.