According to appraisal theories of emotion, thinking must occur first before experiencing emotion. Richard Lazarus was a pioneer in this area of emotion, and this theory is often referred to as the Lazarus theory of emotion.
According to this theory, the sequence of events first involves a stimulus, followed by thought which then leads to the simultaneous experience of a physiological response and the emotion. For example, if you encounter a bear in the woods, you might immediately begin to think that you are in great danger. This then leads to the emotional experience of fear and the physical reactions associated with the fight-or-flight response.