Q: What is the shafi ruling on using synthetic alcohol in food products like ice cream, biscuits etc

A: The fact that alcohol is synthetically produced (assuming that synthetic production entails chemical processes other than fermentation) is of no consequence in determining whether or not it is khamr. That fact is to be determined simply through the presence or absence of the quality of iskar.

Having said that, our fuqaha have ruled that the presence of khamr in medicinal compounds is overlooked when two conditions have been met: a need for the medicine (حاجة), and obliteration to the point of untraceability (استهلاك) of the khamr.

قال في مغني المحتاج: "إن التداوي بالخمر حرام إذا كانت صرفا غير ممزوجة بشيء آخر تستهلك فيه. أما الترياق المعجون بها ونحوه مما تستهلك فيه فيجوز التداوي به عند فقد ما يقوم به التداوي من الطاهرات فعندئذ يتبع حكم التداوي بنجس. وكذا يجوز التداوي بذلك لتعجيل الشفاء بشرط إخبار طبيب مسلم عدل بذلك، أو معرفته للتداوي به وبشرط أن يكون القدر المستعمل قليلا لا يسكر." 

Alcohol was used in medicine, not as a primary ingredient intended to intoxicate, but as a solvent intended to bind ingredients into a single substance. The same is true for its use in composite foods today.

It is true that most composite foods are not necessities. As such the element of need cannot be invoked. However, alcohol, specifically ethanol, as a solvent has a very widespread presence, not only in composite foods but in many other substances with which people commonly come into contact: dyes, paints, inks etc.. The factor of need (حاجة) for such substances is thus replaced by the element of common affliction (عموم البلوى). Both these factors create exception from the rule.

The second condition of untraceability is satisfactorily met in that the alcohol content tends to be a very small fraction of a percentage.

In light of the above we are persuaded that the consumption of foods in which ethanol has been used as solvent, and remains in microscopic quantities, is permissible.

Should the solvent happen to be any alcohol other than ethanol, it is permissible without having to resort to the rule of exception. 

والله تعالى أعلم