The programming of manipulators is a common task in robotics, for which numerous solutions exist. In this work, a new programming method related to the common master-slave approach is introduced, in which the master is replaced by a digital twin created through haptic and visual rendering. To achieve this, we present an algorithm that enables the haptic rendering of any programmed robot with a serial manipulator on a general-purpose haptic interface. The results show that the proposed haptic rendering reproduces the kinematic properties of the programmed robot and directly provides the desired joint space trajectories. In addition to a stand-alone usage, we demonstrate that the proposed algorithm can be easily paired with existing visual technology for virtual and augmented reality to facilitate a highly immersive programming experience.