First, you should wash your eyes with clean water. Second, let them dry with a clean towel. Third, try to cry, which is a effective way to remove irritants out of your eyes. Finally, you can use eye drops to soothe the pain. Then your eyes will recovery very quickly.
Rinse your eyes with cold, clean water. The shampoo don't contain harsh chemicals, so it won't cause damage to your eyes. I often let shampoo get into my eyes and I always flush it out with water. There is no problems with my eyes.
Flush it out with water. Then close your eyes for about 2-3 minutes. And then you can put a warm towel over your eye. You will feel better soon. When you wash your hair, shampoo can get into your eyes easily if you open your eyes. So you'd better close your eyes while washing hair.
It also happens to me when I am washing hair. To avoid shampoo coming into your eyes, close your eyes tightly and find a proper position that water would not run down your face. If you get shampoo into your eyes, wash your eyes with clear water and it should be OK.