Preheat the oven to 400ºF.
Slightly thaw the pie crust just enough that you can prick the base with a fork. Line the pastry case with parchment and add dried beans or pie weights. Blind bake the pie crust for 10 minutes.
Reduce the oven temperature to 325ºF.
In a medium non-stick pan cook the bacon until crisp, giving it an occassional stir.
Transfer the baccon to a paper towel lined plate.
Pour off most of the bacon fat from the pan . Cook the shallots over low heat until soft and translucent. Remove the pan from the heat and set aside.
Beat the eggs in a mixing bowl and add the heavy cream, salt, cayenne pepper and nutmeg. Whisk well together.
Spread the shallots over the base of the crust and top with half of the bacon, then all of the gruyere and the remainder of the bacon.
Place the crust on a baking sheet and pour the mixture into the crust.
Sprinkle the chives over and bake at 325ºF for 45 to 50 minutes until the custard is set and slightly golden.