Slice the bacon into 1/4 inch chunks. Finely dice the shallot and garlic, and slice the mushrooms.
If using fresh peas, bring a large pot of salted water up to a boil while you're cooking the other ingredients. The peas are the last thing to be added so having the water ready when you are is important.
If using frozen peas, thaw them out partially in the microwave. And if using canned peas, drain and rinse them, then set them aside.
Heat a large heavy bottom skillet over medium low heat. Add the bacon and cook to your desired doneness. Drain in paper towel and set aside.
Pour off all but 1 Tbsp of the bacon fat. Add in the 2 Tbsps of butter, followed by the shallot, garlic, and mushrooms. Mushrooms absorb cooking fat fast, so it's important to use enough even though it might seem like a lot. Cook gently, stirring frequently until the mushrooms have released their liquid and have taken on a nice golden brown colour around the edges. The shallots and garlic should be caramel coloured. When the mushrooms are nearly done, cook your fresh peas in the boiling water for about 5 minutes. Immediately drain and add the peas into the pan with the mushrooms, shallots, and garlic. Add the chili flakes if using. Lower the heat. With frozen or canned peas, simply add them when the mushrooms are done.
Add the bacon back to the pan and stir for another couple minutes to let all the flavours come together. Season with salt and pepper to taste.
Remove from the heat and stir through the basil right before serving.