You could try the Norm Abrams method, where he sets the shelf in a dado and then uses a pin nailer to shoot nails through the shelf and into the side. The pins are tiny, and the head is right up against the vertical side, so they are pretty much invisible. This will mechanically fasten the shelf to the side and help provide resistance against the side pulling away from the shelf. Norm used this method on a lot of carcasses he built for different projects.