Police allege a man entered a premises on the Great Western Highway in Kingswood and threatened three staff members with a firearm before fleeing with cash at about 12.40am today.
Soon after, police stopped a rideshare vehicle and spoke to a male passenger, who allegedly fled on foot, and began jumping over fences on First Avenue.
Police allegedly found a firearm and multiple clothing items after searching the car.
A man, 37, was later located in a dumpster on Bringelly Lane with the assistance of the dog squad.
He was found with the allegedly stolen cash and was arrested.
CCTV footage shows the man getting into the dumpster, and then police finding him 40 minutes later.
He was charged with robbery while armed with a dangerous weapon at Penrith Police Station.
He was refused bail in Penrith Local Court today.