If the motor will run, even by holding the start switch, then I suggest running the motor till the ram cycles back up. If the door will not open and the compactor will not run to bring the ram back up then you will have to raise the ram manually.
To do this first you will need to lay the compactor down on either of it's sides. There a lower access panel you will have to remove to access the chain and gears. See the image below.
You can manually turn the drive gear and raise the ram until the door can be opened.