Prepare rice according to package directions.
Heat oil in a large pan over medium heat. Add onions and cook for 8 minutes until golden brown. Remove half the onions and set aside for garnish. Add garlic and ginger to the remaining onions. Cook for 1 minute until fragrant.
Stir in cumin, coriander, turmeric, garam masala, and chili powder. Cook for 30 seconds to release the aroma. Add chicken and stir to fully coat with the paste. Cook for 2 minutes or until lightly browned on all sides.
In a small bowl, whisk yogurt with a few spoonfuls of warm sauce from the pan to temper it, then stir it into the pan. Stir in nut butter and chicken broth. Simmer gently for 20 minutes, until chicken is cooked through, and sauce is thick and creamy. Stir in heavy cream, if using.
Season with salt to taste. Garnish with reserved onions and cilantro. Serve with rice.