Cut the fish into small pieces. Place the pepper, chillies, coriander, spring onions, garlic, lemongrass and fish sauce into a food processor and blend to a paste.
Add the fish pieces to the paste and blend well. Mix to a smooth paste adding coconut milk and egg.
Place the mixture in a bowl. Slice the beans finely into 3mm (1/8in) and stir into fish paste. Chill in refrigerator overnight or for at least two hours.
Half-fill a heavy-based frying pan with oil and heat over a medium to high heat. (CAUTION: Hot oil can be dangerous. Do not leave unattended.) Shape the chilled paste into small patties with the help of a spoon. Carefully lower the fish patties into the hot oil, in batches (the oil should reach halfway up the sides of the patties). Fry until crisp and brown, turning once during cooking. Remove from the oil using a slotted spoon and set aside to drain on kitchen paper. Repeat the process with the remaining fish patties.
For the salad, cut the cucumber in to 5mm (¼in) slices
Dissolve the sugar in the vinegar and toss the cucumber slices in it. Fold in the chilli, shallot and coriander.
Sprinkle with the peanuts and fish sauce just before serving.