The ending I remember, she escapes, and while sitting in the car, it flashes back and you realize she's in the cave and hallucinated it all. \

EDIT: It should be known that I had no idea there was a spoiler tag... it all showed up as a blue hyperlink to me. Which routed to a 404. Sorry if I ruined the movie. 