Watch the scene where Shrek and Donkey return to the swamp after Fiona leaves to go with Farquad to his castle. Donkey is building a wall with sticks and logs and Shrek gets angry at Donkey and starts pulling out some of the sticks. You will notice that Donkey tries to get it back by biting down on it. In the next scene no less then a second later you see that Donkey has the stick on his forehead.