There is a study described at nih.gov about the rate of absorption of caffeine through the skin and how hair follicles contribute to it ("significantly", is apparently the answer to that). Another study compared how three different substances, including caffeine traveled through different thicknesses of skin in humans and animals
The first-referenced article above has this summary about what was known at the beginning of the study:
Recently, it has been shown that the hair follicles are responsible
for a fast delivery of topically applied substances. After topical
application, caffeine was already detected in the blood of the
volunteers after 5 min, whereas, when the hair follicles were
selectively blocked utilizing the newly developed Follicular Closing
Technique (FCT), caffeine was detectable only after 20 min
Faith Williams, a researcher who studies skin's permeability to chemicals, had this to say about caffeinated soap in a 2003 article for the Guardian:
Caffeine does go through the skin if you apply it to the surface in
solution But I would have
thought that not much would go through [from soap] because I don't
think it would stay in contact for very long.
Given that statement, you might experiment on yourself (after getting all the requisite sign-offs that you're complying with human subject research ethics of course) by leaving the shampoo on your scalp for a longer time before rinsing.