You could use a pocket hole screw on the underside of the shelf, if I'm envisioning your setup correctly.
Just place the pocket hole underneath the shelf aimed outward toward where you want the thin tree trunk to join with it. You can create one with a simple jig, a clamp, and a drill.
Use self-tapping screws to avoid the hassle of lining up pilot holes with the trunk. Once the shelf is installed, you can finish off the look with a pocket hole plug matching the wood the shelf is made out of.
I'd recommend using wood glue to supplement the joint strength.
Also, if you plan on using this method frequently for more projects, spring for a better jig. I have the one pictured above, and it works great for small projects. After using it on several dozen joints though, I wish I had bought this model instead.