Using a stand mixer fitted with the paddle attachment, cream together the butter, sugar, and salt on medium speed for 2 to 3 minutes, or until pale and light. Scrape the sides and bottom of the bowl with a rubber spatula. Add the flour and beat on low speed for about 30 seconds, or until the flour mixes with the butter-sugar mixture. The mixture will look like wet sand. Add the egg yolk and continue to mix on low speed for about 30 seconds, or until the dough comes together.
If making a pie shell, have ready a 9-inch pie pan dish. If making a tart shell, line a baking sheet with parchment paper and place a 10-inch tart ring on top. Remove the dough from the refrigerator and let soften at room temperature for about 30 minutes. Using a rolling pin, bang and flatten the dough into a disk about 1/2 inch thick. Flour the work surface, and then sprinkle the dough disk with a little flour. Roll out the dough into a circle 10 to 11 inches in diameter and about 1/4 inch thick for a 9-inch pie shell, or about 12 inches in diameter and just under 1/4 inch thick for a 10-inch tart shell. Make sure the work surface is well floured so the dough doesn't stick to it, and make sure the disk itself is floured well enough to keep the rolling pin from sticking to it. Roll from the center of the disk outward, and gently rotate the disk a quarter turn after each roll to ensure the disk is evenly stretched into a nice circle. Don't worry if the dough breaks a bit, especially toward the edges. You can easily patch any tears once you have lined the pan.
Roll the dough circle around the pin and then unfurl it on top of the 9-inch pie pan or the 10-inch tart ring. Press the dough well into the bottom and sides of the pan or ring, and use any scraps or odd pieces to patch up any tears or missing bits. Make sure the entire interior is well covered with dough, and then press one last time all the way around to ensure any holes have been patched. Trim the edge of the dough so it is even with the rim of the pan or ring.
Position a rack in the center of the oven, and heat the oven to 350°F (176°C). Bake for 30 to 35 minutes, or until golden brown. Let cool to room temperature on a wire rack. If you are making a tart shell, remove the tart ring. Proceed as directed in individual recipes.
Place the chocolate in a small heatproof bowl. In a medium saucepan, combine the cream and instant coffee powder and heat over medium-high heat until the mixture is scalded, which means when bubbles start to form around the edge of the pan but the cream is not boiling.
Place the sugar in the bottom of a medium saucepan and slowly pour in the water. Stir gently to moisten the sugar. If any sugar crystals are clinging to the sides of the pan, brush them down with a pastry brush dipped in water. Place the pan over medium-high heat and leave it undisturbed until the mixture comes to a rolling boil. (You want to avoid crystallization of the syrup, which can happen if the pan is disturbed before the sugar starts to color.) Then continue to boil rapidly without moving the pan until the sugar syrup starts to caramelize. This will take 3 to 4 minutes: the sugar syrup will boil furiously; then as it thickens, it will boil more languidly; and then you will see some of the syrup starting to color and darken around the edge of the pan.
When you see color in the pan, gently swirl it in a circular motion so the sugar caramelizes evenly. The syrup will start to turn golden brown, and then as you swirl the pan, the syrup will continue to get a bit darker and then darker still. To check the true color of the caramel, tilt the pan so you can see the syrup covering the bottom. This is the actual color of the caramel, and you want to keep cooking the caramel until this layer is a deep amber-brown. It takes just seconds for caramel to go from great to burnt, so be sure to tilt and check constantly.
As soon as the caramel is ready, slowly add the cream and then reduce the heat to low. Be careful. The steam that rises when the cream hits the caramel is extremely hot. Let the caramel and cream sputter for a few seconds until the mixture settles down, and then whisk to mix in the cream. Turn the heat up to medium and whisk together the caramel and cream (the mixture will have hardened a bit) for 2 to 3 minutes, or until they come together. Whisk in the butter, salt, and vanilla. Remove from the heat, pour into an airtight heatproof container, and refrigerate for at least 4 hours and up to 1 week.