Secure the thread and bring the needle to the surface at the position of the button and bring it through the hole in the shank. Take the needle down through the fabric and back to the surface again.
Repeat, making several stitches through the shank and fabric.
Work on the wrong side and make a couple of stitches through the threads to secure.
Once the threads are secure, fasten off.