Create cabinet in trash compactor space
This is slightly hard to answer without knowing what tools you have at your disposal. Perfect world, you'd have access to a complete shop (tablesaw, chopsaw, pneumatics, pocket hole jig). My description will talk about tools I'd use. Imperfect world, you can usually fake it with hand tools.

You probably want a well-supported shelf at the bottom. I'd cut it so that it would be a very tight friction fit. I'd support it on 4 sides, direct to the floor. The front support can be a surrogate for a toe kick panel. (Supports can be anywhere from 3/4" thick on up.)

The top and bottom rails can be glue only, but better if you pocket screw them into the stiles. Definitely glue the bottom rail to the shelf. I'd air nail the rail to the front of the shelf as well. You could put something as a backer for the top rail as well, but those parts don't get anywhere near the abuse that a bottom rail gets.