As the barrel returns forward to its initial position the bolt remains behind and thus the spent shell is ejected through a port on the right-hand side of the receiver. Then the bolt returns forward and feeds another shell from the magazine into the action.
As the barrel moves forward to its starting position, the bolt stays behind, causing the spent shell to be expelled through a port on the right side of the receiver. Then the bolt advances and retrieves another shell from the magazine to load into the action.