Answer: The
Shulchan Aruch (OC 328:22) writes that one may rub oil into a (minor) wound on
Shabbos, but not fat that will melt. The Mishna Berura (328:71) adds that this
applies equally to oil that has solidified. The Rema (OC 326:10) explains that
one cannot use bar soap on Shabbos because it is nolad, (creating a new
entity). The Mishna Berura (326:30) explains that doing so is also an issur
of memachek (smoothing).
R’ Moshe Feinstein (OC 1:113) writes that he didn’t allow
liquid soap in his house, either, as it is also a potential issur of memachek.
Nonetheless, the Aruch Hashulchan (OC 326:11) and Kaf
Hachaim (OC 326:43) write that one can prepare liquid soap before Shabbos. R’
Yaakov Yechezkel Posen (Kitzur Hilchos Shabbos 32:4) writes that common practice is
to be lenient like these poskim. Similarly, R’ Yosef Shalom Elyashiv (Kovetz
Teshuvos 1:38, quoted in Orchos Shabbos 1:17:n40; Dirshu Mishna Berura 327:n32)
permits using liquid soap on Shabbos, writing that the foam produced is no
different to pouring beer on Shabbos, which is permitted even though it
produces a foamy head.
In conclusion, while one mustn’t use soap bars on Shabbos,
one may wash one’s hands with liquid soap.