A basketball hoop isn't required but it is recommended to help with your accuracy.
Hold the basketball in your dominant hand ( mine is my right) and spread you fingers out evenly. Then put your non-dominant hand on the side of the ball to support the ball.
Stand feet shoulder-width apart.
These are the steps to find the eye that your most comfortable with.
Step 1- Find a mark on a wall.
Step 2- Make a triangle with your finger and line up the mark with the middle of your triangle.
Step 3- Close right eye then close left eye.
Step 4- What ever eye the mark is not in the center is the eye that is behind the ball. As you can see, the ball is in front of my right eye which means my left eye is stronger.
Now back to how to shoot a basket
Once your legs are shoulder width apart bend your knees.