Sprinkle the eggplant cubes with salt and place into a colander. Fit a bowl about the same size as the colander on top of the eggplant, and weigh it down lightly. Put the whole apparatus into the sink. After a half-hour, rinse the salt off the eggplant and drain.
Heat the olive oil in a large saucepan over high heat until it shimmers. Add the red pepper flakes and crushed garlic cloves. Saute until the garlic is brown around the edges. Remove and discard the garlic. Add the eggplant and onions, and saute until the eggplant has browned at the edges.
Add the tomatoes, rice, shrimp, salt, parsley, and 1 1/4 cup (10 oz.) of water. Bring to a light boil, stir well, and cover the saucepan. Put it into a preheated 350-degree oven, and cook for 30-35 minutes, until the rice is tender.
Sprinkle with chopped parsley and green onions before serving.