There is a foam form of rogaine which comes out of an aerosols bottle and once applied is absorbed into the scalp. Would rubbing it in be memareiah? What about not rubbing it in. It would appear to me that since the intention in that it should be absorbed into the scalp no fissure should apply like we see from what the Mogen Avrohom writes in regards to spitting kn a tiled surface. Then again it could be assure because of nolad?( creating the foam). Also shmiras shabbos khilchosa says hair creams are assur... so can I use this foam version or should I buy the liquid, he is matir hair oils. Also is there a problem in refuse bicllal for rogaine?
In regard to the Magen Avraham you mentioned, I should clarify that the Magen Avraham refers to spitting upon the ground where there is no floor. Furthermore he stipulates that there is no rubbing of the spit. Smoothing out the foam would be considered "memeareich". However, leaving the issue of "memeareich" aside there is a problem using the Rogaine because it is considered "refuah" on Shabbat. Therefore, in light of what I said I can only reiterate what Rabbi Lewis already suggested and that is to apply the Rogaine right before and right after Shabbat. Be well and Chag Same'ach