Haitian Rice with Red Beans


2 cups of rice (Basmati or Thai rice)
1 onion
2 shallots
9 oz of canned beans (with their water)
3 cups of water
A small bunch of parsley
1 bay leaf
1 thyme branch
3 garlic cloves
3 cloves
2 tablespoons of butter
2 tablespoons of vegetable oil
Salt and pepper to taste