- Heat the oil in a large pan over medium heat. 
- Add the chopped onion and minced garlic. 
- Sauté until the onion becomes translucent. 
- Add the rice to the pan. 
- Cook for about 3 minutes, stirring to coat the rice with oil and flavors. 
- Pour in the chicken stock and bring to a simmer. 
- Add the chili powder and cumin at this stage. 
- Mix in the beans and reduce the heat to low. 
- Cover the pan and let the rice cook gently. 
- Cook until the rice absorbs all the liquid, usually around 20 minutes. 
- Let it sit for a few minutes before fluffing with a fork.