If you’re stocking shelves in a grocery store, see it as a means to an end. Remember that you’re a writer first. You only stock shelves to pay the bills until your writing career takes off.
Then make sure that each day, your writing takes precedence. That means that you start the day with your writing, when you’re full of energy and fresh ideas. You don’t try to do it just in those few stolen moments when you really “feel like it.”