Colnbrook Food And Wines in Slough has been closed until further notice after a customer who bought a loaf of bread that had been chewed by mice alerted the council officials.
The shop had been selling about 200 hand-made sandwiches a day, a Slough Borough Council spokeswoman said.
The shop owners were unavailable for comment.
The council applied to the magistrates court for a Hygiene Emergency Prohibition Order, which was approved on Friday.
The order will force the store, in Colnbrook Court, Colnbrook, to remain closed until environmental health officers are satisfied people shopping there are no longer at risk.
Levine Whitham, from the council’s food and safety team, said: “When we arrived at the premises we immediately became aware there were mice droppings everywhere – on the shelves, on the floor, in drawers, around packets of food and even in boxes of children’s sweets.
“There were also droppings in the sandwich preparation area and we found loaves of bread which had been extensively gnawed.”
Environment officers had closed Colnbrook Food And Wines on Wednesday because of “an imminent risk to public health”, a council spokeswoman said.
Ms Whitham said: “This is one of the worst mice infestations I have seen and it is unacceptable for the shop to have continued trading with such a widespread and obvious problem.”