Go to advanced settings, go to food and drink, now check "Use food," and assign the health percentage where you want your toon to eat. Now, enter the name of the food if you have. IF you don't have, what the bot will do is that it will just sit there and wait until you get full health I believe.
I recommend you to bot in easier areas, avoid areas where they have like 4 mobs next each other or so. Also, it depends on the character you're using. Say you're using hunter, its piece of cake, but if you're using rogue or warrior, its pretty difficult. So make sure you buy food to keep it 100% all the time.