I believe this is something I pinned on Pinterest 4+ years ago? while I was planning my nursery.
I was just going to nail/glue some boards together, put them on the wall and call it good enough but when my dad heard this plan he was all "no, no, no, you need to use biscuits and blah, blah, blah" OK dad, I know you are right but you have to help me! So 4 years later, here we are BUT the good news is a child could climb up these and they will be fine - pending the whole wall doesn't fall down.
Since I am cheap and like to recycle, I used some of the knotty pine paneling I took off the bathroom wall and have hoarded down in the basement which means these shelves cost me $0. I'm not sure what my dad spent on biscuits and glue, under $3? I might stain the shelves to match the woodwork someday though that will be another 5 years down the road.