A man accused of shooting a man at a St. Paul bus shelter and stealing his bike has been sentenced to five years in prison.