Place the rice in a heavy pot. Fill partway with cool water and swish the rice around to rinse. Carefully pour out the cloudy water, and rinse 3 more times until the water is mostly clear. Add the coconut milk, water, and salt to the pot of rice. Heat over a medium-high flame and bring to a boil. Stir, reduce the heat to very low, and cover tightly. Cook 15-20 minutes, undisturbed. Remove from heat and let rest, covered, for 10-15 minutes.
Toast the cashews in a dry skillet over high heat, stirring frequently, until golden brown and fragrant. Remove from heat and set aside.
Melt the butter or coconut oil in a small skillet over medium-high heat. Stir in the shallots and a pinch of salt. Cook, stirring occasionally, until the shallots are dark, golden brown. Transfer to a paper towel-lined dish.
Fluff the rice in the pot and transfer to a serving dish. Top with the toasted cashews and fried shallots.