Are you going to run a vent line in the wall behind the new sink? If you do, the sink will be properly vented. If all you do is connect the sink p-trap to the shower line without a sink vent, then your sink p-trap will not necessarily work properly. You may hear gurgling or sucking sounds at your sink when you drain a large volume from the sink. Nevertheless, the shower p-trap will keep sewer odor from coming up through the drain, which is one of the main objectives of drain plumbing. FYI, your installation may not be per code but probably will work okay.