When I go button shopping, I find myself attracted to the shank buttons since they are usually the prettiest or most interesting ones.
For clothing purposes, shank buttons are great because the additional height makes the button easier to fasten and they don't pull as much on the fabric where the button is attached.
If you are using a shank button on accessories, they work really well with button and loop closures (like on the envelope clutches). The additional height gives the loop some space and it is easier to grasp when opening.
They can also just be added for a purely decorative touch, but in this case you might want to try to eliminate some of the wobble. By their nature, they are meant to have a bit of flexibility and movement. But some secure stitching can help stabilize them.
Here is the technique I use when sewing shank buttons on accessories:
First, I always sew them with the shank vertical. Most of the stress from the loop pulling or rubbing, is going to happen at the very bottom of the loop. So having the threads run horizontal gets them out of the way somewhat and lets the loop lay against the bottom of the shank.
Then I sew 3-4 stitches along the horizontal plane, going through the shank and then down into the fabric and coming out on the other side of the shank.
After tacking the button in place with the horizontal stitches, then I start to sew in an X shape. The idea is to hold the button down much like how a tent is held down with ropes and stakes.
Go through the button shank and rather than inserting your needle right next to the existing stitches, insert the needle above the stitches. Sew one long stitch under the fabric vertically on the same side you just entered the fabric. Come out at the bottom and pass your needle through the shank.
Repeat the vertical stitch on the other side. Continue sewing until the button seems pretty firmly in place.
If the button is just for fun, then use as many stitches as you need to keep it in place. Try to keep them neat and use thread that matches your fabric (black is used for demonstration purposes here).
For buttons that used to fasten things you will want to sew the button on firmly, but don't over sew them. Each stitch weakens the fabric as the thread pulls fibers apart. So the combination of too many stitches and pulling from use, can lead to a missing button and sometimes a missing chunk of fabric!