Andrew Morris, 27, an unemployed former construction worker, parked the digger in a zone which was reserved for disabled vehicles at an Asda store in Wakefield, West Yorkshire.
Morris then went inside to do some shopping, leaving the JCB digger blocking the cars outside the supermarket, magistrates at Morley, near Leeds, were told.
Morris, of Healey Drive, Ossett, West Yorkshire, was banned from driving at the time. However, he said that he did not know that the ban included diggers.
Morris admitted driving while disqualified and was banned for a further year and jailed for five months.
Startled shoppers alerted the police when Morris arrived at the store with three other people last July.
His solicitor, Phillip Howell, told the court that Morris, who bought the digger for pounds 5,000 two weeks earlier, had no idea that his driving ban extended to all vehicles.
He added: "He thought it was safe to drive it on the roads and that he wasn't doing anything wrong. If he'd known, he'd never have been on the road with the JCB."
Mr Howell said that although Morris did not need a driving licence or insurance to use the digger for a job he was due to start, repairing parts of a motorway, he needed them both to drive it privately on public roads. Morris also pleaded guilty to driving while not having insurance and admitted two other charges of driving a car while disqualified.