Hi and welcome..
First you have to leave your pansies mature and grow til the end of their season...look for stocks that the pansy
flowers have naturally dropped off, pick up the dropped
flower, in the center you'll see a little pod. Pick off the pods and put them in a dish...leave them dry up some more. Then you pinch open the pods...the
seeds will look like
pepper flakes.