Wash the pipis in cold water, discarding any that are open.
Mash the fermented red bean curd with a fork then stir in the yellow bean soy sauce, stock and sugar.
Heat a wok until just smoking. Add the vegetable oil and, when hot, add the garlic and chillies and stir-fry until fragrant. Deglaze the wok with shaoxing, add the pipis and stir-fry for 2–3 minutes. Add the capsicum and bean sauce mixture to the wok and toss together.
Cover the wok with a lid and cook for 2–3 minutes, shaking the wok occasionally, until the shells just begin to open up, then use a slotted spoon to transfer the pipis into a bowl.
Return the wok to the heat and simmer the sauce, uncovered, until it reduces and thickens slightly. Pour the sauce over the pipis to serve.