Store employees in Corsicana, about 50 miles south of Dallas, eventually discovered the 14-year-old boy and two living quarters he had carved out behind boxes along the aisles of the store.
The boy pilfered food and drinks from the store. He reportedly changed clothes periodically to avoid detection.
Corsicana police in a statement Wednesday say the boy was visiting his aunt in Corsicana when he ran away July 28. He was found two days later at the store.
Police say the teen, from nearby Rice, has a history of running away, tending to hide in abandoned homes and businesses.