Preparing for grocery store shortages can be done by growing your own crops, stockpiling items while theyre still available and storing your available food to last a long time. If the shelves are looking less and less stocked, it's a good indicator that the companies providing their products are struggling to push them out. Beating the crowds and stockpiling (reasonable amounts) is recommended.
On top of stockpiling from the actual stores themselves, growing your own fruits and veggies is a good way to ensure you have fresh produce at hand. With climate change directly affecting farmers and their crops, the possibility of produce being affected is very probable. Having your own garden or greenhouse in your backyard eliminates the fear of empty produce shelves.