Digital potentiometer with op amp

That's what I figured it activates a function being high or low but wasnt sure.

As for the rc filter would it look something like this? Course I would be replacing Vs here with the pwm signal source and connect the end grounds to the -5V line on the wall wart Ill be using for power? Can I leave out the resistor and cap I don't understand why would need a filter?

Sorry if I'm being stupid but this is the first time I've dealt with pwm and not put it directly to and led or servo.