Structure and dynamics of the Shapley supercluster