I would guess that it is done in gumpaste. It could also be fondant with tylose or another material added to make it dry hard. Roll it into a snake and form the heart shape. Let it set for a couple days to dry good and hard. That's how I would do it anyway.