Recommended pine dimensions for desk/shelf unit
A simple Butt joint like this will avoid any visible screws :

https://www.1001pallets.com/common-wood-joints/

Those pins, having a larger diameter, and glued, will be stronger than screws as the smaller diameter of the screws will likely "rip out" of the end grain.

Or you could countersink the screws and fit covering plugs.