Density matrix embedding theory (DMET) provides a theoretical framework to treat finite fragments in the presence of a surrounding molecular or bulk environment, even when there is significant correlation or entanglement between the two. In this work, we give a practically oriented and explicit description of the numerical and theoretical formulation of DMET. We also describe in detail how to perform self-consistent DMET optimizations. We explore different embedding strategies with and without a self-consistency condition in hydrogen rings, beryllium rings, and a sample SN2 reaction. The source code for the calculations in this work can be obtained from https://github.com/sebwouters/qc-dmet.