Steven Douglas, 24, Robert McIndoe, 23, and Andrew Paton, 22, carried an imitation firearm whilst robbing the Wallace Allan shop in Ayr town centre in November 2013.
They fled empty-handed when a staff member pressed a panic alarm.
Police swooped on them later that day after they noticed Douglas's singed tracksuit bottoms. He had burnt them whilst torching their getaway car.
Yesterday, they were handed prison terms after a hearing before Lord Boyd. He sentenced Douglas to three years and four months and McIndoe to four years and eight months.
Paton, who has a previous High Court conviction for a firearms offence, was jailed for five years. The judge also ordered he be supervised by the authorities for two years following his release from prison.
Passing sentence, Lord Boyd told the three men he had no option but to send them to prison.
The story emerged following a hearing at the High Court in Glasgow last month. Sentence had been deferred until yesterday at the High Court in Edinburgh.
Douglas, a prisoner of HMP Kilmarnock, McIndoe, of Dennistoun, Glasgow, and Paton, of Bishopbriggs, East Dunbartonshire, pled guilty to attempted armed robbery. McIndoe and Paton also pled to possessing an imitation firearm with intent to rob.
Prosecutors accepted Douglas, formerly of Dennistoun, Glasgow, did not know his two accomplices were armed.