Sand and prime if necessary. If your fabric is thin, you'll want to prime with white so that the color of the shelves doesn't show through the fabric.
Cut a piece of fabric large enough to cover your shelf, plus half an inch on the ends.
Apply a layer of Mod Podge Matte onto one side of your shelf. Carefully align the fabric so it lays square on the shelf, leaving about an extra half inch of fabric hanging off the first end.
Apply Mod Podge to the front edge of the shelf and carefully fold the fabric over it, smoothing it into place. Feel free to pull on your fabric as needed.
Paint Mod Podge onto the third side of the shelf and smooth the fabric into place once again. There should be about a half inch of extra fabric on both raw ends of your fabric.
Paint a last layer of Mod Podge onto the wall-side edge of your shelf and stick the raw ends onto it.
Paint Mod Podge all over the outside of your fabric and use a brayer to force the Mod Podge all the way through the fabric. Do all four sides and let the whole shelf dry completely.
Paint all four sides again with a layer of Mod Podge Hard Coat, and let your shelves dry completely before hanging.