As shampoo is not in powder form and contains a lot of other chemical compounds, we cannot use the typical lab tests for the detection of potassium and sodium ions. You'll need advanced techniques and equipments . Spectrometer will do the job. Also note that, the technique used for detection of the specified ions varies widely with the amount of ions involved.