Remove all of the items that you currently have sitting on the shelves.
Measure the distance between the shelves with a tape measure. Do this at an area that is not sagging. Also measure the depth of the shelf.
Purchase a divide for each shelf cut from 3/4-inch plywood. The divider should be as tall and deep as the measurements you took. If you have a circular saw, you can cut the plywood on your own.
Insert the divider on each shelf directly in the center. Each divider supports the shelf above it and looks like a large book on the shelves. You can paint or cover the divider in any way that you want so that it blends in with your decor.
Put items back on the shelves once you finish.