HELP! - How to Create an Obstacle

I am creating this game and I have created this rectangle shape (the wall). I want an object to stop moving when it touches the shape.

How do I do that??