An Invercargill man got into trouble for trying to steal an ice block - by putting it down his pants.

When an Invercargill man was asked what was down his pants, he immediately confessed.

Jack Andrew Adcock, 22, appeared before Judge Christina Cook in the Invercargill District Court on Tuesday on a charge of shoplifting.

He pleaded guilty to stealing a Kapiti white chocolate and raspberry ice block at The Warehouse in Invercargill on December 21.

A police summary of facts says Adcock concealed the ice block down his pants and attempted to leave the store.

He was then confronted by a staff member "who asked him what he had down his pants", the summary says.

"He immediately told the staff member what he had done and handed the ice block over."

When spoken to by police, Adcock said what he had done was a stupid decision and he wasn't thinking at the time.

Judge Cook sentenced Adcock to 60 hours' community work and ordered him to pay $3.80 reparation, the value of the ice block.