Actually, I only lined one shelf, the one that gets the messiest, where I store all of the bottles of cooking liquids like oils, molasses, soy sauce, vinegar, and honey. The oils, molasses, and honey are the worst offenders in the pantry. They drip down the sides of the containers and make a mess of the shelf.
I had put off lining this particular shelf for literally years. I didn't have shelf paper or anything to use in place of shelf paper . . . or did I?
Remember all of that brown paper that came as packing material during the shutdowns? Okay, maybe you got lots of styrofoam pellets instead. I got reams of crumpled brown paper. I rolled up the paper and stored the rolls on end in a larger box.
I used some of the paper for creating a barrier between layers in boxes of onions, potatoes, and tomatoes harvested from my garden and stored in our cold room. I also used some directly in the garden to suppress weeds among vegetables. And I used some as gift wrap.