Solution Found

I have checked Mark Overduin contribution http://ez.no/developer/exponential...cks/including_php_files_in_templates (Thanls a lot Mark) and I will use a variant of it to preserve contents and design separation.

I will implement one function for every external funcionality I need and I will call it as a custom operator template, this will reduce the security risk associated with including custom code by the designers (a possibility with Marks approach).