1) To make the dough: Mix together the flour and salt. Add the egg to the flour and combine. The dough will be quite clumpy at this stage.
2) Work in the sour cream and soft butter until the dough comes together in a slightly rough, slightly sticky ball.
3) Using just your fingertips, knead and fold the dough without adding additional flour until the dough becomes less sticky but still quite moist.
4) Wrap the dough well in plastic wrap and refrigerate for 30 to 60 minutes, or up to 48 hours.
5) To make the filling: Combine the warm mashed potato and cheese. Stir and mash until the cheese is melted and the filling is cool to the touch. Taste and adjust the seasonings with salt and pepper.
6) To fill the pierogi: Roll half the dough 1/8" thick. Use a 2" round cutter to cut circles of dough. Repeat with the other half of the dough. Save the scraps; these can be snipped into small pieces and added to simmering soups.
7) Place 2 teaspoons of filling on each round of dough. Gently fold the dough over, forming a pocket around the filling. Pinch the edges of the pierogi to seal, then seal again with the tines of a fork.
8) At this point the pierogi can be frozen for up to 4 weeks, or refrigerated overnight, or cooked in a large stockpot of boiling salted water. Only cook about 10 pierogi at a time, so that they have room to float without sticking. When the pierogi float after about 10 minutes, they're done.
9) Sauté the shallots or onion in the butter i a large skillet until the onion begins to brown. Add the drained pierogi and cook until browned and crisped. Serve hot with additional sour cream, applesauce, or other condiments.
Yield: 1 to 2 dozen pierogi, depending on size