Yes. That is perfectly natural and probably the most straightforward way to say it.
Using tanto ... quanto adds a little emphasis, something like both the rice and the beans rather than just the rice and the beans. It can sound slightly more careful or emphatic, but it is still normal Portuguese.
Na is a contraction of em + a.
So:
This kind of contraction is extremely common in Portuguese.
Prateleira means shelf.
That is a little different from estante, which usually means a bookcase, shelving unit, or stand. So na mesma prateleira means they are on the same individual shelf, not just somewhere in the same cabinet or shelving structure.
The ending ão is nasal, which is one of the sounds English speakers often need to practice.
The exact sound is not a normal English ow sound. Air flows through the nose too. Listening and repeating native audio helps a lot with this pattern.