If you leave the door open at the end, the stuff will all pour out once if gets to that point.
Well there are two main ways. The first is to upend the container completely and feed the product in either through an open door or through a trap door close to the top of one of the doors.
The container upender is a mighty machine. The empty container is placed upon a steel frame where it is locked in place using container locks on the corners to secure it to the frame. The frame has a safety ladder built horizontally along one side, along with a full width platform at the door end. Then the container is upended using a powerful mechanism. The operator climbs the ladder then stands on the platform, where he can supervise the loading of the product coming from a conveyor and where a chute directs it in through the trap door.
When the container is full, the chute is withdrawn and the trap door closed. The operator descends and the container is allowed to pivot down to rest on the frame where it can be weighed. The container is then transferred to a truck.
The second option is to keep the container in the horizontal position, then feed through the trap door using either a screw or belt conveyor -- usually to about 2/3rds the way in. The product flows in and drops down to fill as much as the container can hold before it chokes the supply. The horizontal conveyor is withdrawn slowly to allow maximum filling.