Grind together all ingredients for the yellow curry paste, all ingredients up until the shrimp paste. Add water as necessary and grind to a fine paste. Heat a heavy bottomed pan and add oil to it. When the oil turns hot, add half of the curry paste (freeze the remaining for later use) and fry on low heat until the raw smell vanishes and most of the moisture is gone. Keep stirring to avoid the paste sticking to the pan.