Shell and de-vein the prawns, leaving the tails intact.
Cut a line along their back to the tip of the tail.
Peel the shallot and slice it very thinly.
Chop the tomatoes into small cubes.
Mix both vinegars with the sugar and soy sauce.
Heat a heavy-bottomed pan or a wok. Pour half the oil into it. When it starts to smoke, carefully add the prawns and stir-fry for about a minute. As they turn pink, remove them to a plate, cover and rest.
Add the remaining oil to the pan, when hot, add ginger, garlic and onion. Fry until tender for about 2 minutes, then add the soy-vinegar dressing. Stir for 2-3 minutes.
When the sauce is reduced by half, add the tomato pieces and beans. Put the prawns back and fry for 2-3 minutes whilst constantly stirring.
Finally add the butter, season with salt and pepper.
Serve warm.