A unit (1) for receiving and treating capsules (C) containing a basic preparation for an ice cream product comprises: a housing (2) configured to receive a capsule (C) containing a basic preparation for an ice cream product an unloading device (3) adapted to trigger expulsion of the capsule (C) from the housing (2).The unloading device (3) comprises an impact portion (4) adapted to engage the capsule (C) and a locking portion (5) configured to lock the unloading device (3) to the unit (1).