Some tips on how to avoid getting hammertoes when wearing high heels has to do with the shoes that you choose and what you do to your feet after you wear the high heels. A closed toe shoe like a stiletto pump is going to put more pressure on the front of the foot, forcing the toes to contract in and start forming the hammertoes.
Women who start having hammertoes usually complain about pain in their feet when they wear the closed shoe, usually in the winter season, and when in the warmer weather and they wear the open-toed shoes, there's much less pressure on the front of the foot and they experience much less pain.
What to do after you wear your high heels to avoid getting the hammertoes has to do with stretching and opening up the front of the foot. There's a great product called Yoga Toes that you can slide on your foot and it will stretch and open up all of the toes, elongating and stretching the muscles in the front of the foot.
I also advise people to stretch the back of their legs, which is the calf muscle, which puts much less pressure on the front of the foot. The less pressure you have on the front of the foot, the less the foot will contract in and start creating the hammertoes.