Place the rice and 1 1/2 cups water in a medium saucepan and bring to a boil. Stir once, reduce heat to lowest setting and cover with a tight-fitting lid. Cook rice 15 minutes; remove from heat. Leave covered and allow rice to continue steaming for 5 to 10 minutes.
Heat the oil in a large skillet or wok over medium-high heat. Add the garlic and cabbage and stir-fry until cabbage is almost fully cooked. Add the shrimp and pineapple and stir-fry 1 to 2 minutes longer, until the shrimp turn bright pink. Remove from heat. Mix together the soy sauce, vinegar, and pepper flakes; pour over the shrimp. Stir the scallions and basil (or cilantro) into the rice. Top with the shrimp-pineapple mixture and serve.