Rinse the basmati rice under cold water until the water runs clear. Soak the rice in a large bowl of water for at least 30 minutes, then drain.
In a large pot, bring 4 cups of water to a boil. Add a pinch of salt and the soaked and drained rice. Cook the rice for 5-7 minutes until it's partially cooked but still firm in the center. Drain the rice in a colander.
Rinse the dried barberries under cold water. In a small saucepan, heat 2 tablespoons of butter or oil over medium heat. Add the barberries, sugar, and optional ground cinnamon, turmeric, and lemon juice. Sauté for 2-3 minutes until the barberries are plump and slightly caramelized.
In the same pot used to cook the rice, spread a layer of the partially cooked rice. Add a few spoonfuls of the barberry mixture on top. Gently mix, but be careful not to break the rice grains. Continue layering the rice and barberries until all the rice and barberry mixture are used.
Reduce the heat to low. Cover the pot with a clean kitchen towel or a lid wrapped in foil to catch steam. Steam the rice for 30-40 minutes, allowing the flavors to meld together.
Gently fluff the rice and barberries with a fork. Garnish with slivered almonds or pistachios if desired. Serve alongside your favorite dishes.
Enjoy your meal!