a package of plastic strips designed just for this purpose at the Home Depot. They are about two feet long and come with four on a pack. They have a slight bevel on one side that you put between the wall and the carpet. You place them down along the wall and paint your basebaord. The move them down to the next area to be painted. They worked great for me. They are flexible enough that I used one to paint the trim along the carpeted stairs as well. Hope this helped!