Shotts have always proved difficult opposition but in recent times Rangers have gained the upper hand over them.
Nevertheless the visitors made a good start to the game and twice Connell had to make good saves to keep his goal intact.
However it was the home side who went in front just after the quarter hour mark though. Nicky Prentice made a fine run and put over a cross which Willie Sawyers knocked in from very close range.
It was a much more even game now with chances being made at both ends although Shotts, assisted by the strong breeze were putting in quite a few long range efforts.
It was a simple defensive error though that brought an equaliser for the visitors, a cross in from wide right was met by Burns who tapped in at the back post.
All square at half-time was a fair reflection of play, but after just five minutes of the second half Rangers regained the lead; this time it was Neil who beat Murdoch with a good shot.
But then Burns got the break and ran in to get the better of Connell in a race for the ball to bring Shotts back level.
It was end to end stuff with Shotts now pressing hard but Rangers defence was resolute.
Then, completely out of the blue, Upton struck a great shot from around 35 yards which sailed over Murdoch and into the net, a goal fit to win any game.
The remainder of the game was a nervous time for the Rangers fans and although Shotts continued to press it was Rangers who finished the game stronger to take the victory.
Another hard game awaits Rangers next week when they visit St Rochs who gained their first victory last week, and then a trip to Craigmark for the second round Scottish cup tie the following week.