Happy New Year!
All you need are two 1 x 4s and one 1 x 2 boards. Ours were 10 feet long but you could do any length. Sand them down a bit to smooth out ends. We painted ours first, but you could wait until they are assembled, too. We didn't paint the back or bottom.
Nail the two 1 x 4s together at a 90 degree angle. (The bottom board of the shelf should butt up against the back, giving you the most width.) Then attach the 1 x 2, having the bottom board butt up against that.
Find some stuffies for quality control. Is it me, or is that cat smiling extra wide?
Side view: you can see how their bottoms nestle in to the ledge and don't slip out.
We took the entire shelf and screwed it right into the studs of the wall (a stud finder, drill and husband are all very handy at this point!).
Dig out all your stuffies from drawers, closets, underneath blankets, etc. and line them up. Don't they look happy?