When James Maloney appeared in court in October he was released on bail on condition he abide by a curfew.
But on Sunday the 21-year-old from Sandside breached the order when he found himself in the Mossbank shop after 8pm.
Realising his mistake he telephoned the police in the hope they would do something about it.
As a result Maloney appeared from custody at Lerwick Sheriff Court on Monday, where he admitted breaching the order.
Sentence was deferred, and he was released on bail.