Does incorporating whipping cream in a chocolate syrup extend its shelf life?
If you have an ingredient which is supposed to be cooked through, and cook it before it expires, the shelf life of the now cooked dish would be the standard for all cooked dishes, 3-5 days, no matter if the expiry date of the ingredient falls within these 3-5 days or not. Assuming that your syrup is cooked, and your cream is still good, I think it is safe to use that rule. 

But in your case, the problem is that you already opened the cream "some months ago". This means that you bought UHT cream with an expiry date months in the future. The important point here is that this date assumes a closed container. UHT is a sterilization technique, similar to canning. Just like you can't open a tin of beans and expect them to sit in the open and stay good for months, you can't expect the cream to stay good. UHT dairy, once opened, should be treated like any other perishable food: refrigerated and used up within 3-5 days. Most people don't care about this, as it doesn't change its taste for over a week outside of the fridge, but keeping it out is not a safe practice. In any case, sitting at room temperature for months is way too long. 

You mention freezing: don't freeze dairy, it doesn't work well. 

Bottom line: When you open cream, you have to use it up. Whether you make syrup with it or not, it has the same shelf life from the point of opening.