Man accused of shooting and killing wife's friend faces judge