Buy food from any in-game shop first. Whatever you purchase lands in your inventory rather than going straight to your pet.
Open the inventory, click the food item, then press the Use Item button. Your Mara Pet appears and eats it. Keeping a small stock of food on hand saves you a trip to the shop every time your pet's hunger bar dips.