Preheat oven to 350 degrees.
Heat oil in a medium skillet, add onion and cook until soft. Add ham and cook an additional 1 minute. Remove from heat. Place to the side. In a large bowl, gently whisk eggs, add chopped basil and shredded cheese. Add ham mixture to the egg mixture. Pour immediately into prepared pie shell. Bake in preheated oven for 60 minutes, until set. Let stand 10 minutes before serving.