In a large skillet, heat oil over medium-low heat. Add onions, leek, and shallot; cook about 20 minutes or until golden brown, stirring occasionally. Cool.
Preheat oven to 425 degrees F. On a floured surface, unroll one pie crust at a time. Cut thirty 3-inch circles of dough. Place dough circles in ungreased 1-3/4-inch muffin cups or 1-3/4-inch individual fluted tart pans; press against sides and bottoms. Do not prick. (If using individual tart pans, trim the excess pastry so it is even with the edges of the pans and place pans on a baking sheet.) Place a small ball of foil in each cup or pan. Bake for 6 minutes; carefully remove foil balls. Bake about 4 minutes more or until pastry cups are lightly browned. Remove from oven and reduce oven temperature to 350 degrees F.
In a bowl, beat eggs lightly with a fork. Stir in onion mixture, milk, basil, salt, and cayenne pepper. Stir in cheese.
Spoon egg mixture into the hot, baked pastry shells, filling each full. Be careful not to drip the mixture down sides of cups or pans. Return filled shells to oven. Bake for 10 to 12 minutes or until filling is set. Let stand in pans for 2 minutes. Carefully remove from pans; cool on wire racks. Place cooled tarts in a single layer in a plastic freezer container; cover and freeze. Attach serving directions to gift (below).