Puerto Viejo attracts a lot of local and international bohemians, who seem to survive solely on the sale of handmade jewelry, painted ceramic trinkets (mainly pipes and cigarette-lighter holders), and imported Indonesian textiles. You'll find them at makeshift stands set up by the town's parquecito (little park), a few wooden benches in front of the sea between Soda Tamara and Stanford's.
In addition to the makeshift outdoor stands is a host of well-stocked gift and crafts shops in town. The Jewelry Factory and Color Caribe, both on the main road into town, sell a wide range of jewelry, crafts, and gift items, as well as Costa Rican hammocks. Luluberlu, located inland across from Cabinas Guaraná, features locally produced craftwork, including shell mobiles and mirrors with mosaic-inlaid frames, as well as imports from Thailand and India. For ceramics, head south to Playa Chiquita and check out the traditional Japanese-style works at Raku Art.
Tip: My favorite local purchase is locally produced chocolate, which comes wrapped in wax paper the size and shape of a roll of quarters. They come plain or flavored with coconut, peanuts, mint, ginger, or raisins, and can be found for sale at many gift shops and restaurants around town.
Finally, if you need a book to read on the beach, head just south of town to Echo Books, which has a good supply of new and used books, as well as a small cafe and gift shop. The owner also specializes in making homemade truffles and other chocolate treats from local cacao.