How can an experiment show cause and effect?
An experiment can not prove a cause and effect relationship. However, given a "cause and effect" hypothesis, an experiment can demonstrate results consistent with the hypothesis.
Repeated experiments which produce results consistent with a cause-effect relationship provide evidence to support the relation hypothesis.
Alternately an experiment can be used to disprove a cause-effect hypothesis. It only requires one counter example to disprove a hypothesis.
Causality is a difficult concept to define (and even more difficult to prove).