The robbery happened at 3 a.m. Tuesday morning near G and Olive Streets in Merced.
Police arrested 24 year-old Laban Charo, Jr. after a bystander said he was seen smashing out the glass to the front door and burglarize the Rite Aid.
Officers found the suspect after the witness wrote down his getaway car's license plate.
Police recovered two cartons of cigarettes stolen from the store.