I added shelves in both the pantry and closets in our RV. I used 1/2 x 1/2 vertical posts in the corners and used gorilla glue to attach them to the sidewalls (didn't want to put screws in those very thin sidewalls). The shelves just sit on top of the posts and can be removed if needed, the posts being in the corners can barely be seen and are not in the way of anything.
2016 RAM Laramie 2500 CC 4x4 Cummins Turbo Diesel
2017 Forest River Wildwood X-Lite 254RLXL