|Voted Best Answer
Both can help but you are limited in what you can do. You'll have to remove all of the old insulation in the attic to prepare for the spray foam between the ceiling joists. You can not spray foam insulation between the rafters. There have been several discussion forums on the topic across the web. I believe it was Owen's Corning that put out a bulletin on the topic a while back but I'd have to search for it. Your roofing manufacturer's warranty will be effectively nulled because you no longer will have air flow under the decking. This traps heat in the shingles and cooks them from both sides, significantly reducing their life span. You can place radiant barrier under the roof because it does not provide a significant source of insulating R-value which traps the heat.
Make sure you will never remodel your home if you spray foam the ceiling. You will have a very difficult time getting to the electrical boxes or air register boxes after the fact and will add significant cost to the remodel expense. For bang for your buck in retrofit applications here in Texas you'll do best to have blown insulation added to boost your attic R-value to about a R-38. Also, put the foil radiant barrier up. Between the two you won't get much better on attic heat blocking. Make sure you have adaquate attic cross ventilation in terms of gable, soffit, and ridge vents. Any other more costly moves will be limited in productivity based on the age and construction of the home without further remodel including replacement of windows, doors, HVAC system with ducting, etc.
Todd's Home Services
San Antonio, TX