Is using a shampoo with olive oil equally efficacious as using olive oil and shampoo separately?

My hair has turned frizzy now, and I had to stop using flat iron over it, as it has been the root cause of my hair damage. I have read somewhere that olive oil if applied at night, and then washed off the next morning, helps in revitalizing the hair, and making it smooth. However, I have a concern that I cannot keep oil on my head for longer than an hour, because it causes headache otherwise! I wanted to know from some hair expert if I could use a shampoo with olive oil instead, to ensure the quality of olive oil with the properties of a shampoo! Please help me with some suitable advice! Thanks.