Put the piece of cardboard inside where the pillow usually goes. It sometimes helps to have the fabric pulled tight over the cardboard, so you may have to do the painting in sections if the cardboard is small.
Have fun painting your design.
Let it dry, then have an adult iron over the finished pillowcase with a medium hot iron to set the paint.
Wash before using.
Note: This is a great slumber party idea. Divide the pillowcase in sections and have each of your friends paint something on it and sign their name. It also makes a great moving away present for a friend.