Knotty pine can be beautiful, but you may want to paint over it eventually. Painting over pine can lighten up a room or make it more your own. Keep in mind that painting over pine is quite different from painting drywall. The tricky part about painting pine is that the knots leak resins over time that will discolour the paint on top. This can be avoided by carefully preparing the wood before painting it your desired colour.
Wash the pine to remove dust, grit and grease. If the pine is greasy, use a degreaser such as dish soap and thoroughly rinse it with clean water. If the pine is not greasy, you can simply use water.
Sand the pine with fine grit sandpaper. You can sand the pine by hand or you can use an electric sander to speed up the process. After you have finished sanding, use a vacuum to remove all the dust and wipe the wood with a clean rag.
Apply white pigmented shellac to the pine knots with a paint brush. Allow the shellac to dry completely and then add one more coat of shellac. Be generous with the shellac, but don't let it form drips on the pine. Wait 24 hours before beginning the next step.
Sand the shellacked pine knots with fine grit sandpaper. Wipe the dust away from the wood after sanding.
Apply a paint primer over the shellacked pine knots. This primer will help the top coat of paint to stick to the shellac. If you like, you can coat the entire piece of pine with primer, including the areas that don't have knots. This will help your surface to be more uniformly even. If the pine is extensive or if you don't think it's necessary, you can just prime the knots.
Wear a respirator mask when sanding to keep tiny particles out of your lungs.