1. The beans can be pinto, kidney, or other red beans or you can use one 15 ounce can of these. They should be cooked.
2. Heat 1 tablespoon of the olive oil in a large skillet over medium heat. Add the next 7 ingedients. Cover and cook, stirring occasionally, until softened, about 10 minutes. Season with the salt and the pepper to taste. Set aside to cool.
3. In a food processor, combine the beans, rice, parsley, and sautéed onion mixture. Season with the salt and pepper if needed. Then pulse to blend. Do not make a paste. You want some texture. Then shape into patties and set aside.
4. Heat the remaining olive oil in a large skillet over medium heat and add the bean cakes and cook until browned. Turn and cook until browned on the other side. 7 to 10 minutes total. Reduce the heat to low and keep warm while you prepare the sauce.
5. Place the almonds and shallots in a blender and grind into a paste then add the coconut milk and season if needed. Blend until smooth. Transfer to a small saucepan over low heat and cook, stirring, until hot.
6. Transfer the bean cakes to a platter, pour the sauce over them, and serve.