How can I attach lumber for a shelf so that screws are not seen?
Option 1: Don't use screws. Old-school cabinet makers used dowels and glue. It's not difficult, but you'll want to read up on alignment techniques. Joints are very strong.



image source

Option 2: Use pocket screws. They're what modern cabinet makers use. They're probably cost- and effort-prohibitive in your case, though, since they require special tools (or advanced technique) and your work space is very tight.



image source

Option 3: Use long screws from the bottom. If your dimensions are correct, and your top panel really is 2 inches thick, you have enough material to counterbore from below and run the screws in that way.



image source