We establish recurrence and transience criteria for critical branching processes in random environments with immigration. These results are then applied to the recurrence and transience of a recurrent random walk in a random environment on ℤ disturbed by cookies inducing a drift to the right of strength 1.