Hi Jim,
Processed food and imported foods you find in the grocery store can be expensive in Costa Rica because of the high import taxes. Restaurants in a place like Playas del Coco, which is a tourist area, will also be more expensive because it caters to people on vacation.
Most Costa Ricans do a lot of their shopping at the farmers’ market where you can get cheap fresh fruits and vegetables, as well locally-sourced items like fresh fish.
If you try to buy the same items you would back home in Costa Rica, you’ll likely spend as much if not more. Expats who keep their cost of living low shop local. They also make things from scratch. For example, at my house we make our own pasta sauce, hummus, pesto, guacamole, etc. using fresh ingredients. Buying stuff in a jar from the U.S. is just too expensive. Our stuff tastes better too. 🙂