insulating basement rim joists foam should be installed between each joist to prevent air leaks each rectangle needs to be sealed at the perimeter with caulk or canned spray foam insulate basement rim.