As much as the above responses are excellent advice, I personally wouldn't jump to such extents quite yet. All kids go through quirky phases of unusual habits, and yes, they are somewhat obsessive-compulsive and show signs of specific phobias, but as long as you talk to him gently and thoroughly about it, the phase should pass. Ask him questions. Why does he want to pee into bottles? Where did he first get the idea? Children-- or anybody, for that matter-- don't repeatedly do things that they don't get something they like out of it. Ask him what he likes about it. Whatever his answer, try to replace it with something that might sound better to him. Explain that only the toilet is meant for urinating, that "big boys" or "grown up" boys go there, and is the safest place to do so.
I would do a little research into what's going on at school. I know that people will pay kids to urinate in a bottle for them because a child's urine is "clean" and can pass a drug test. I have also heard of chidren, who are afriad of using a public bathroom, urinating in bottles because they are afriad of exposing themselves, or had a traumatizing experience in a bathroom.
It can also be a sign of hoarding or OCD...the child does not want to let go of part of him or herself. I would express your concern to a your child's pediatrition and maybe see a child psychologist. You may find out that your son was just fasinated with urine and was playing scientist. At that point you can explain to your son with out embarrassing him or making him feel bad that urine is not something to play with and should be flushed down the toilet. Maybe buy him a child's chemestry set to play with instead! Please keep us posted and I hope you find peace in this situation!
Howard Hughes did this during the height of his agoraphobia. I'd have your son talk to a counselor.