Toast the terasi on a dry pan until fragrant, about 5 minutes or so
Heat the oil. Cook shallot, garlic, tomato, and chilies until they turn soft
Transfer to a food processor. Add salt and sugar; then blend until it becomes a smooth paste. Adjust the seasoning
Transfer to a plate and serve with lime juice