A Georgian man was caught stealing a router from Currys after driving up from London.
Zurab Pochkidze, 32, of no fixed address, pleaded guilty to the theft which took place on September 12.
Prosecuting, Marie Stace said that at 4.20pm a group of men were seen acting suspiciously on the Dysart Road retail park.
Pochkidze got out of a rental car and was later seen leaving Currys with a bag which he gave to another man.
The vehicle left but was stopped a short distance away. The router, which was stocked by Currys, was found in the boot.
Miss Stace said Pochkidze had said he was on his way to Scotland with others and they had decided to stop in Grantham for a rest. The theft was a spur of the moment decision.
Defending, Julian Sheen told the court that the defendant had been in the UK for 10 months and was a Georgian national. he had a wife and child in the former Soviet republic and had come to the UK looking for work, but due to bad health and language problems he had struggled to find a job.
Mr Sheen said his client had been seen by immigration officials over the weekend and they had told him they will be sending him home. he said Pochkidze had spent three nights in the cells.
The magistrates gave Pochkidze three days in custody and he was allowed to go free because of time served. No costs were awarded.
Vazha Jojua, 26, of Old Bethnall Green Road, London, and Pavlos Pourtselatze, 28, of Dagenham, both pleaded not guilty to theft at Currys in Grantham on September 12. Jojua also denied going equipped for theft. They face trial on January 7.
Both were granted bail on condition they reported to their local police stations three times a week, surrendered their passports and did not enter Lincolnshire except to see a solicitor or attend court.