Functionalization of carbon nanotubes with hydrosoluble porphyrins (TPPS) is achieved by $pi$-stacking. The porphyrin/nanotube interaction is studied by means of optical absorption, photoluminescence and photoluminescence excitation spectroscopies. The main absorption line of the porphyrins adsorbed on nanotubes exhibits a 120 meV red shift, which we ascribe to a flattening of the molecule in order to optimize $pi-pi$ interactions. The porphyrin-nanotube complex shows a strong quenching of the TPPS emission while the photoluminescence intensity of the nanotubes is enhanced when the excitation laser is in resonance with the porphyrin absorption band. This reveals an efficient excitation transfer from the TPPS to the carbon nanotube.