I used to use craft foam for about a year or 2 to line my molds with back in the day (about 4 years ago), and I had mixed results with them. Although they worked great for the most part, they would sometimes cause my soap to have craters along the surface edges. To explain- when I took my soap out of the mold and peeled off the foam liners, the surface of the soap just underneath the liners were pock-marked with craters, making the surfaces of my soap look like the surface of the moon. I was never able to pin down the reason why it would happen because it seemed to occurr so randomly, but for what it's worth, I never got craters when I used freezer paper (my liner of choice before I started using the foam).
Nowadays, depending on my mood, I use either heat-resistant quilter's mylar from Joanne's Fabric store (found down the quilting aisle),
or one of the decorative Wilton fondant mats made out of silicone that you can find at Michael's Craft Store and Joanne's Fabrics (I really love the 'Graceful Vines' one). They both work great and never give my soap craters. I cut them both to fit my mold in the same manner that I used cut the craft foam to fit, and I 'stick' them to the sides of my wood mold with a little vaseline dabbed on the back, and then soap away. The mylar liners give my soap's surface a super-smooth, glassy finish every time, and the fondant mat liners do the same while also imprinting a beautiful twisting vine design on the surface.
Oh- I should mention that I lightly 'grease the sides of the mylar liners that will be touching my soap with a little mineral oil to prevent sticking. I don't need to do that with the silicone fondant mat, though. That stuff peels off like buttah with no outside help from me at all.
IrishLass
Edited to add- these liners last forever, too. My mylar liners are about 4 years old (the same ones), and my fondant mat liners are a little more than a year or so old now. Both are still in great shape.