Both! The back leg of the top shelf is also the back leg of the bench. The middle one is screwed into the frame for both the bench top and the lower shelf. The entire frame is both screwed and glued, with the tops just screwed in so they’re replaceable. Finally, I have a big L bracket at the top screwed into the wall to prevent tip over.
I’m planning on putting a small lip on the top shelf to prevent the bins from falling down during small earthquakes.
Oh yeah! Of my “expensive” tools, my power miter saw makes a lot of jobs easier, but the drill press lets me do things I couldn’t do without it.