Before we look at how shampoos and liquid soaps are made lets just look at the difference between them, as they contain totally different chemicals and are made by different methods. Liquid Soap is just a thick water solution of normal soap, just like you find in any bar of soap. So how is liquid soap, or any soap for that matter made.
All soap comes from the reaction of fat and sodium hydroxide.
Soaps have been in use since 600BC but their main disadvantage are that they are quite harsh, they are often very basic and react easily with metal ions found in most water to form insoluble scums. In recent years chemists designed detergents that act in exactly the same way as soap does but are much less harsh and do not form the insoluble salts that soaps do. Detergents are not made from fats such as animal fat like soaps are but are made from the petroleum industry. The reactions are quite complicated but involve the reaction of molecules of sulfer trioxide or sulfuric acid on petrolium to form detergents like the one show below. Most cleaning products these days use detergents instead of soap as their cleaning agent due to its more desirable properties.