Sift 3 cups of flour in large bowl. Add ½ teaspoon of salt. Pour ¾ cup of boiling water into the bowl, while stirring with a wooden spoon. There will be lumps so break them up. Cover the bowl with kitchen towel and set aside for 5 minutes.
After 5 minutes, add ¼ cup of cold water and stir until there are no large clumps. Cover again with kitchen towel and set aside for 15 minutes.
Add ½ teaspoon of vegetable oil and start kneading until the dough becomes smooth and a uniform mass. It will be slightly sticky at first but will form into a ball after 5-10 minutes of kneading. It should be stretchy and a bit adhesive. Cover in bowl for 45 minutes. This is just done to allow the gluten in the flour to relax a little. Do not expect it to rise.
While dough is resting make the filling. Mix together the mashed potatoes, cheddar cheese, sour cream, sauteed shallots and ½ teaspoon of salt. It should stick together when your can form a ball.
Add flour onto surface and roll out the dough until you reach a thickness of about ⅛ inch. Use a cup or ramekin that is about 3-4 inches in diameter. Place on top of dough and use a knife to cut a circle. With cut circle, put some water around the entire edge, so once folded it will stick together. Place 1 tablespoon of filling inside each circle. Fold the dough and press together with a fork. Collect scraps of dough, knead again and roll out and repeat above steps.
For the pierogies you are going to eat right now, boil in pot of salted water for about 5 minutes or until they float. While they are boiling heat the butter over medium heat in a large skillet. Add the shallots and cook for about 2 minutes. Drain the pierogies and add them to the skillet and cook on each side for 2 minutes. Serve immediately.
If you are freezing the pierogies or not eating all of them, boil for 1 minute and then place in pot of ice water to stop the cooking process. Place on a baking sheet and put in freezer. Once frozen, place in plastic bag and use when ready. Boil for 5 minutes and the saute when ready to use.