The Dirichlet space D is the space of all analytic functions f on the open unit disc D such that f is square integrable with respect to two-dimensional Lebesgue measure. In this paper, we prove that the invariant subspaces of the Dirichlet shift are in one-to-one correspondence with the kernels of the Dirichlet-Hankel operators. We then apply this result to obtain information about the invariant subspace lattice of the weak product D D and to some questions about approximation of invariant subspaces of D.Our main results hold in the context of superharmonically weighted Dirichlet spaces.