Preheat an oven to 350 degrees F (175 degrees C). Spread the rice onto a baking sheet.
Bake the rice in the preheated oven until golden, about 15 minutes. Remove and allow to cool. Once cooled, grind into a fine powder with a spice grinder. Meanwhile, grind the chicken thigh meat in a food processor until finely ground; set aside.
Heat the peanut oil in a wok or large skillet over medium heat. Stir in the garlic, galangal, chile peppers, and green onions; cook and stir until the garlic softens, about 3 minutes. Add the ground chicken thigh meat, and cook, stirring constantly to break up lumps, until the meat is no longer pink, about 5 minutes. Season with fish sauce, shrimp paste, and sugar. Reduce heat to medium-low, and simmer until the excess liquid has evaporated, about 5 minutes more. Stir in the ground rice, mint, basil, and lime juice to serve.