Place 1 cup of the coffee, the raspberry-flavor syrup, the half-and-half or light cream, and the ice cubes in a blender container. Cover and blend until the ice is finely crushed. Add the remaining coffee. Cover and blend on the lowest speed just until combined.
To serve, pour the coffee mixture into glasses. Top each glass with a scoop of coffee-flavor ice cream and, if desired, chocolate shavings.