What is the best way to remove cigarette smoke smell from a house?
I know you're removing the carpets, but shampooing them will get rid of a lot of the lingering smell.  You may need to do it more than once; if so, make sure to let them dry completely in between.  After they're dry, vacuum them with a HEPA filter to remove dust or smoke particles that you might have dislodged while shampooing.

Smoke will have settled on all the surfaces in the house, so you should definitely think about repainting the walls and ceilings.  Clean them thoroughly first using Trisodium phosphate (TSP).  The Kilz that your realtor recommends is both a sealer and a primer; it will seal in any stains and smells and provide a good base to paint on.

Other surfaces should be cleaned too: kitchen or bathroom floors, doors, windows, countertops, etc.

Finally, just airing the house out will help some: open all the windows and have fans pulling fresh air into the house.  You'll need good ventilation while painting, so you should be doing a lot of this anyway.