Three fire crews were called to Premier Convenience Stores, Ballfield Lane, just after 2am.
They arrived to find a store room to the rear of the shop on fire.
A man who was upstairs when the fire broke out managed to escape unharmed and raised the alarm.
Fire-fighters wearing breathing apparatus fought the fire and evacuated two flats either side of the shop due to smoke-logging.
The occupants were allowed back into their properties once they had been ventilated.
The store room and staircase in the shop were damaged by the fire which is believed to have been caused by overloaded electrical sockets.
The two crews from Barnsley, and one from Royston, left the scene at about 5am