It does rotational work. We can view this work as a medium between gravitational potential energy and rotational kinetic energy. So when it accelerates down the incline, friction force takes some of the gravitational potential energy and turns into diario al kinetic energy